Update an approval policy

PATCH
/approval_policies/:approval_policy_id

Update an existing approval policy.

Path parameters

approval_policy_idstringRequired

Headers

Auth
AuthorizationstringRequired
Bearer authentication of the form Bearer <token>, where token is your auth token.
x-monite-versionstringRequired
x-monite-entity-idstringRequired

The ID of the entity that owns the requested resource.

Request

This endpoint expects an object.
starts_atdatetimeOptionalDefaults to 1970-01-01T00:00:00.000Z

The date and time (in the ISO 8601 format) when the approval policy becomes active. Only payables submitted for approval during the policy’s active period will trigger this policy. If omitted or null, the policy is effective immediately. The value will be converted to UTC.

ends_atdatetimeOptionalDefaults to 1970-01-01T00:00:00.000Z

The date and time (in the ISO 8601 format) when the approval policy stops being active and stops triggering approval workflows.If ends_at is provided in the request, then starts_at must also be provided and ends_at must be later than starts_at. The value will be converted to UTC.

namestringOptional

The name of the approval policy.

descriptionstringOptional

A brief description of the approval policy.

scriptlist of booleans or doubles or strings or lists of any or maps from strings to anyOptional

A list of JSON objects that represents the approval policy script. The script contains the logic that determines whether an action should be sent to approval. This field is required, and it should contain at least one script object.

triggerboolean or double or string or list of any or map from strings to anyOptional

A JSON object that represents the trigger for the approval policy. The trigger specifies the event that will trigger the policy to be evaluated.

statusenumOptional
Allowed values: activedeletedpending

A string that represents the current status of the approval policy.

Response

Successful Response

namestring<=255 characters

The name of the approval policy.

descriptionstring<=255 characters

A brief description of the approval policy.

scriptlist of booleans or doubles or strings or lists of any or maps from strings to any

A list of JSON objects that represents the approval policy script. The script contains the logic that determines whether an action should be sent to approval. This field is required, and it should contain at least one script object.

idstring
status"active" or "pending"
Allowed values: activepending

The current status of the approval policy.

created_atdatetime
updated_atdatetime
created_bystring
starts_atdatetimeOptionalDefaults to 1970-01-01T00:00:00.000Z

The date and time (in the ISO 8601 format) when the approval policy becomes active. Only payables submitted for approval during the policy’s active period will trigger this policy. If omitted or null, the policy is effective immediately. The value will be converted to UTC.

ends_atdatetimeOptionalDefaults to 1970-01-01T00:00:00.000Z

The date and time (in the ISO 8601 format) when the approval policy stops being active and stops triggering approval workflows.If ends_at is provided in the request, then starts_at must also be provided and ends_at must be later than starts_at. The value will be converted to UTC.

triggerboolean or double or string or list of any or map from strings to anyOptional

A JSON object that represents the trigger for the approval policy. The trigger specifies the event that will trigger the policy to be evaluated.

updated_bystringOptional

Errors