---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Workday API, Analytics & Reporting, Analytics and Reporting, Reporting and Analytics/Worktags]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Reference: Validate Worktags
layout: subsection
---

## <a id="conref_common_service_urlBasePath"></a>URL Base Path

<b>Workday API Gateway Base Path</b>

For REST API calls in Workday Extend and Orchestrate for Integrations, use the regional API Gateway base URL for your account. See [Reference: Workday Extend API Gateways and Authorization Base URLs](https://developer.workday.com/documentation/dlh1653340161856) on the Developer Site. Note that the API Gateway base URL doesn’t include the tenant name.

<b>Tenant Base Path</b>

For traditional Integrations using tenanted REST APIs calls:

```
https://<hostname>/api/common/<version>/<tenant>
```

Example:

```
https://yourTenantHostName.com/api/common/v1/gms
```

## <a id="refsyn_N10019_N10016_N10001"></a>URI

<b>Note:</b> Workday recommends that you don't use the Validate Worktags API in the Common v1 REST service. We no longer support them, and plan to retire them. Use the Worktag v1 REST service instead. See [Validate Worktags REST API](/wcp_docs/GUID-68a6fcd0-e930-41f7-878f-fe4998f06cd1-enHYPHENus.html) for more information.

Validate allowed and required worktag types and worktag combinations for a transaction.

```
/validateWorktags
```

<b>URI Parameters</b>

<table><thead><tr><th>URI Parameter</th></tr></thead><tbody><tr><td>The resource supports no URI parameters.</td></tr></tbody></table><br/>

## <a id="section_N10050_N10016_N10001"></a>Description

Validate the allowed and required worktag types and worktag combinations so that you can correct errors before you submit transactions by web service. Validate Worktags supports the POST Validate Worktags method.

## <a id="POST"></a>POST Validate Worktags

-   <b>Secured by:</b>

    -   <i>Manage: Related Worktags</i> domain with <b>View</b> and <b>Modify</b> access.

    -   <i>Worktag REST API</i> domain with <b>View</b> and <b>Modify</b> access.




Use this method to validate a set of worktags for a transaction based on:

-   Transaction type worktag settings on the <b>Maintain Worktag Usage</b> report.
-   Web service default worktag types on the <b>Maintain Worktag Type Precedences</b> task.
-   Related worktags set up on the <b>Maintain Related Worktag Usage</b> report.
-   Company restrictions.


This method doesn't persist data into Workday. It's a read-only POST.

You supply a JSON format body with your request. In the request body, supply values for these parameters:

<table><thead><tr><th>Body Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>taggableConfiguration</td><td>ID</td><td>Required. The worktag configuration used on the <b>Maintain Worktag Usage</b> report. Usually it's a worktag type ID. Example:<i>Expense_report</i>. <p>Some worktag types support more granular configuration. Example: You can use the <i>budget_structure_id</i> of a plan structure as the budget worktag type.</p></td></tr><tr><td>restrictions</td><td>ID</td><td>Restrictions entered on the request. Example: Use the transaction company as a restriction to validate that the cost center is valid for use with the company.</td></tr><tr><td>worktags</td><td>ID</td><td>Set of worktags for the transaction used to determine validation issues. The response validates all worktags on the transaction for: <ul><li>Missing required worktag types.
</li><li>Invalid worktag combinations.
</li></ul> <p>The parameter doesn't support aggregation worktag values. Example: Job family or cost center hierarchy.</p></td></tr><tr><td>allowBuiltInWorktags</td><td>Boolean</td><td>Worktag types that can't be configured as allowed worktag types on the <b>Maintain Worktag Usage</b> report for the <b>taggableConfiguration</b>. Set to <code>True</code> to include built-in worktag types in the request. Example: Spend category worktag for a supplier invoice.</td></tr><tr><td>validationTypes</td><td>ID</td><td>Set of validation types you want returned in the response. Leave the request parameter empty to return all validation types. Use the <b>Worktags REST Validation Types</b> report to view the reference IDs of the supported validation types.</td></tr></tbody></table><br/>

## <a id="section_N100FD_N1001F_N10001"></a>Response

The response body indicates worktag validation issues for the transaction upon submission. Here's a list of the JSON name/value pairs returned in the response body for validateWorktags.

<table><thead><tr><th>Validation Type - Key Name</th><th>Description</th></tr></thead><tbody><tr><td>invalidRestrictionsForWorktags <ul><li>invalidRestrictedToValues
</li><li>worktagWithRestrictedToValues
</li></ul></td><td>The worktag value combination is invalid because of restrictions. Example: The <i>Cost Center</i> in <b>worktagWithRestrictedToValues</b> isn't restricted to the <i>Company</i> in <b>invalidRestrictedToValues</b>.</td></tr><tr><td>invalidWorktagCombinations <ul><li>worktagWithAllowedValues
</li><li>invalidWorktagValues
</li></ul></td><td>The worktag value combination has invalid allowed worktags. <p>Example: The <i>Cost Center</i> in <b>worktagWithAllowedValues</b> has allowed values for region, but the <i>Region</i> in <b>invalidWorktagValues</b> isn't an allowed value.</p></td></tr><tr><td>missingRequiredWorktagTypesForTaggableConfig</td><td>Required worktag types aren't sent in the request for <b>taggableConfiguration</b>, excluding defaults set up on the <b>Maintain Worktag Usage</b> report.</td></tr><tr><td>missingRequiredWorktagTypesForWorktags <ul><li>worktagWithRequiredWorktags
</li><li>missingWorktagTypes
</li></ul></td><td>Required worktag types for a worktag are missing. <p>Applies to requested worktags that have related worktag types set up as required.</p> <p>Example: The <i>Cost Center</i> in <b>worktagWithRequiredWorktags</b> requires <i>Region</i>, and <i>Region</i> is in <b>missingWorktagTypes</b> because it isn't in the request.</p></td></tr><tr><td>missingRequiredWorktagTypesAfterDefaulting</td><td>Required worktag types aren't sent in the request for <b>taggableConfiguration</b> after applying defaults set up on the <b>Maintain Worktag Type Precedences</b> task.</td></tr><tr><td>nonAllowedInactiveWorktagValues</td><td>The request includes inactive worktag values, but the worktag type set up doesn't allow inactive worktag values.</td></tr><tr><td>nonAllowedWorktagTypesForTaggableConfig</td><td>Worktag types sent in the request aren't allowed for the <b>taggableConfiguration</b>.</td></tr><tr><td>onlyOneProjectOrPhaseOrTaskAllowed</td><td>The set of worktags can't contain more than 1 of these worktag types on the request: <ul><li><i>~Project~</i>
</li><li><i>~Project Phase~</i>
</li><li><i>~Project Task~</i>
</li></ul></td></tr><tr><td>status</td><td><ul><li><i>Success</i> indicates that the set of worktags is valid for the request.
</li><li><i>Error</i> indicates the set of worktags for the request is invalid.
</li></ul></td></tr></tbody></table><br/>

Validating worktags has restrictions and requirements. You might receive an error message when you attempt to validate worktags:

<table><thead><tr><th>HTTP Response Code</th><th>Error Message</th><th>Description/Solution</th></tr></thead><tbody><tr><td>400</td><td>Taggable Configuration is required.</td><td>Supply a value for taggableConfiguration.</td></tr><tr><td>400</td><td>Duplicate worktag types aren’t allowed.</td><td>Sending more than 1 value for the same worktag type isn't allowed.</td></tr></tbody></table><br/>

## <a id="section_N10305_N10016_N10001"></a>POST Validate Worktags Examples

### Example

On expense report, this POST request validates:

-   Cost Center <i>10000 Office of CEO</i>.
-   Region <i>Trans AA - Central Africa (inactive)</i>.


The configuration for expense report:

-   Doesn't allow inactive <i>Region</i>.
-   Has required <i>Business Unit</i>.
-   Doesn't allow worktag types <i>Cost Center</i> and <i>Fund</i>.


Worktag type precedence isn't enabled.

```
POST /validateWorktags
```

Using this request body:

```
{
    "taggableConfiguration":{"id":"Taggable_Type_ID=EXPENSE_REPORT"},
    "worktags": [
        {"id":"Cost_Center_Reference_ID=10000"},
        { "id":"Organization_Reference_ID=REGION-4-132"}
    ]
}
```

The response body is the worktag validation in JSON format:

```
{
  "missingRequiredWorktagTypesAfterDefaulting": [
    {
      "descriptor": "Business Unit",
      "id": "babec3e40ccf4a27b5b771d138289bbb"
    }
  ],
  "missingRequiredWorktagTypesForTaggableConfig": [
    {
      "descriptor": "Business Unit",
      "id": "babec3e40ccf4a27b5b771d138289bbb"
    }
  ],
  "nonAllowedWorktagTypesForTaggableConfig": [
    {
      "descriptor": "Cost Center",
      "id": "dc123302446c11de98360015c5e6daf6"
    }
  ],
  "nonAllowedInactiveWorktagValues": [
    {
      "descriptor": "Trans AA - Central Africa (inactive)",
      "id": "5b8348a2df5448b0bafea0563dc42eb5"
    }
  ],
  "status": "error"
}
```

### Example

On expense report, this POST request validates:

-   Cost Center <i>10000 Office of CEO</i>.
-   Fund <i>AMU Cost Share</i>.
-   Project <i>Transform Reinventing Mobility</i>.
-   Division <i>CPG</i>.
-   Company <i>Global Modern Services, Inc (Indonesia)</i>.


The configuration for expense report allows the worktag types of the worktags sent in the request.

Cost Center <i>10000 Office of CEO</i>:

-   Is restricted to company <i>200.1 Global Modern Services K.K. (Japan)</i>.
-   Has <b>Required on Transactions</b> <i>Gift</i> and <i>Campaign</i>.
-   Allows only Fund <i>FH01 AMU Funds</i> and Project: <i>ACME Projects</i>.


Division <i>CPG</i>:

-   Allows only Fund <i>F03.1 AMU General Plant Fund</i>.
-   Has <b>Required on Transactions</b> <i>Grant</i>.


Worktag type precedence isn't enabled.

```
POST /validateWorktags
```

Using this request body:

```
{
    "taggableConfiguration":{"id":"Taggable_Type_ID=EXPENSE_REPORT"},
    "restrictions":[
        {"id":"Company_Reference_ID=COMPANY-10-209"}
    ],
    "worktags": [
        {"id":"Cost_Center_Reference_ID=10000"},
        { "id":"Fund_ID=AMU Cost Share Fund"},
        { "id":"Project_ID=TRANSFORM_Reinventing_Mobility"},
        { "id":"Organization_Reference_ID=CPG"}
    ]
}
}
```

The response body is the worktag validation in JSON format:

```
{
  "invalidRestrictionsForWorktags": [
    {
      "invalidRestrictedToValues": [
        {
          "descriptor": "200.10 PT Global Modern Services, Inc (Indonesia)",
          "id": "cfdefbbb550e4b37ae88ef0f6518041b"
        }
      ],
      "worktagWithRestrictedToValues": {
        "descriptor": "10000 Office of CEO",
        "id": "3b122818d7934d1c8c663ddbe1937819"
      }
    }
  ],
  "missingRequiredWorktagTypesForWorktags": [
    {
      "missingWorktagTypes": [
        {
          "descriptor": "Campaign",
          "id": "dc1234e2446c11de98360015c5e6daf6"
        },
        {
          "descriptor": "Gift",
          "id": "d2e0bdb657da45edadd7cd371d24a13e"
        }
      ],
      "worktagWithRequiredWorktags": {
        "descriptor": "10000 Office of CEO",
        "id": "3b122818d7934d1c8c663ddbe1937819"
      }
    },
    {
      "missingWorktagTypes": [
        {
          "descriptor": "Grant",
          "id": "ea50fe2ba95b453086f8c9616473a1e5"
        }
      ],
      "worktagWithRequiredWorktags": {
        "descriptor": "CPG",
        "id": "1fcf0b79747a43d1a4de334e0c214b1b"
      }
    }
  ],
  "status": "error",
  "invalidWorktagCombinations": [
    {
      "worktagWithAllowedValues": {
        "descriptor": "10000 Office of CEO",
        "id": "3b122818d7934d1c8c663ddbe1937819"
      },
      "invalidWorktagValues": [
        {
          "descriptor": "AMU Cost Share Fund",
          "id": "32b25c2287a6101bebc1a79b7c8a034d"
        },
        {
          "descriptor": "Mobilizing the Enterprise",
          "id": "4fba36e75dce4cf9bf0c386f15dc18b2"
        }
      ]
    },
    {
      "worktagWithAllowedValues": {
        "descriptor": "CPG",
        "id": "1fcf0b79747a43d1a4de334e0c214b1b"
      },
      "invalidWorktagValues": [
        {
          "descriptor": "AMU Cost Share Fund",
          "id": "32b25c2287a6101bebc1a79b7c8a034d"
        }
      ]
    }
  ]
}
```

### Example

On expense report, this POST request validates:

-   Project <i>Mobilizing</i>.
-   Project Plan Phase 2 <i>Define Structure the Enterprise</i>.


```
POST /validateWorktags
```

Using this request body:

```
{
    "taggableConfiguration":{"id":"Taggable_Type_ID=EXPENSE_REPORT"},
    "worktags": [
        {"id":"Project_ID=TRANSFORM_Reinventing_Mobility"},
        {"id":"Project_Plan_ID=PROJECT_PLAN_PHASE-4-8"}
    ]
}
```

The response body is the worktag validation in JSON format:

```
{
  "onlyOneProjectOrPhaseOrTaskAllowed": "Only one of ~Project~, ~Project Phase~ or ~Project Task~ worktag value can be specified.",
  "status": "error"
}
```

### Example

Indicate a specific returned validation type.

On expense report, this POST request validates:

-   Cost Center <i>10000 Office of CEO</i>.
-   Region <i>Trans AA - Central Africa (inactive)</i>.


The expense report configuration doesn't allow:

-   Inactive <i>Region</i>.
-   <i>Cost Center</i> and <i>Fund</i> worktag types.


```
POST /validateWorktags
```

Using this request body:

```
{
    "validationTypes":[       
        {"id":"Worktags_REST_Validation_Type_ID=INACTIVE_WORKTAG_TYPES"}
    ],
    "taggableConfiguration":{"id":"Taggable_Type_ID=EXPENSE_REPORT"},
    "worktags": [
        { "id":"Cost_Center_Reference_ID=10000"},
        { "id":"Organization_Reference_ID=REGION-4-132"}
    ]
}
```

Even though the worktags in the request have other validation errors (Example: <i>Cost Center</i> isn't allowed on expense reports), the response only contains the requested worktag validation of <b>nonAllowedInactiveWorktagValues</b>.

```
{
  "nonAllowedInactiveWorktagValues": [
    {
      "descriptor": "Trans AA - Central Africa (inactive)",
      "id": "5b8348a2df5448b0bafea0563dc42eb5"
    }
  ],
  "status": "error"
}
```

### Example

On supplier invoice, this POST request validates:

<i>Plant Research Grant 1</i>

The configuration for supplier invoice requires:

-   <i>Grant</i>.
-   <i>Cost Center</i>.


The <i>Plant Research Grant 1</i> has default Cost Center <i>10000 Office of the CEO</i>.

Worktag type precedence is enabled, and <i>Grant</i> is one of the worktag types.

```
POST /validateWorktags
```

Using this request body:

```
{
    "validationTypes":[       
        {"id":"Worktags_REST_Validation_Type_ID=REQUIRED_WORKTAG_TYPES_AFTER_DEFAULTING"}
    ],
    "taggableConfiguration":{"id":"Taggable_Type_ID=SUPPLIER_INVOICE"},
    "worktags": [
        { "id":"Grant_ID=AGRT-0021"}
    ]
}
```

The response body is the worktag validation in JSON format:

```
{
  "status": "success"
}
```

<i>Cost Center</i> isn't sent in the request, but it defaults from the grant. Per the supplier invoice configuration, the worktags are valid.

