Get Layout Validation Rules for department or layout

GET {{baseUrl}}/api/v1/validationRules

This API fetches all the validation rules configured for your department/layout.

OAuth Scope

  • Desk.settings.READ

Request Params

KeyDatatypeRequiredDescription
departmentIdstringGet the rules of the department
layoutIdstringGet the rules of the layout
modulestringName of the module for which you want to fetch the layout rules. Allowed values are tickets, contacts, accounts, tasks, timeEntry, contracts, products, calls, events
activeLayoutsstringGet the rules for active layouts
activeRulesstringGet the rules that are active in the layout
fromstringIndex number, starting from which the rules must be fetched
limitstringNumber of rules to be fetched. Default is 50
searchStringstringGet the rules that have this search term
executeInHelpCentrestringGet the rules that can be executed in help centre
includestringAdditional information related to the rules. Values allowed are: creator and modifier.

HEADERS

KeyDatatypeRequiredDescription
Authorizationstring

RESPONSES

status: OK

{"data":[{"fieldConditions":[{"name":"condition 2","pattern":"(1and2)","conditions":[{"condition":"is","fieldName":"email","value":["carol@zylker.com"]},{"condition":"is","fieldName":"phone","value":["9994259718"]}],"actions":{"alert":"Sample Alert"}}],"modifiedTime":"2018-09-14T01:08:42.000Z","fieldName":"email","executeInHelpCentre":true,"createdBy":"4000000015963","createdTime":"2018-09-13T01:16:46.000Z","modifiedBy":"4000000015963","id":"4000000017001","systemGenerated":false,"layoutId":"4000000013564"},{"fieldConditions":[{"name":"condition 1","pattern":"(1and2)","conditions":[{"condition":"is","fieldName":"phone","value":["9994259718"]},{"condition":"is","fieldName":"email","value":["carol@zylker.com"]}],"actions":{"alert":"Sample Alert"}}],"modifiedTime":"2018-09-14T01:08:42.000Z","fieldName":"phone","executeInHelpCentre":false,"createdBy":"4000000015963","createdTime":"2018-09-13T01:49:03.000Z","modifiedBy":"4000000015963","id":"4000000018001","systemGenerated":false,"layoutId":"4000000013564","status":"active"}]}