Create Document Requirement

View as Markdown

Headers

{{tenant_key_name}}stringOptional

Request

This endpoint expects a multipart form.
gatestringRequired

Required: The lifecycle gate this rule blocks - must be registered for parent_record_type in DocumentGateRegistry - example: estimate.accept | workorder.complete | workorder.bill | invoice.payment

document_idstringRequired

Required: UUID of the library Document required at this gate - converted by ConvertUuidToId middleware - must exist

is_blockingstringRequired

Optional: Whether an unsatisfied requirement blocks the gate transition - boolean true|false|1|0 - default: true (false = advisory only)

trigger_modestringRequired

Required: How the document is dispatched - in: auto|manual - auto = Documents listens to the trigger event and auto-sends; manual = staff dispatch from the UI

parent_record_typestringRequired

Required: Morph type / class string of the consuming record the rule applies to - must match a parent_record_type registered in DocumentGateRegistry - example: Modules\Estimate\Models\Estimate or “invoice”

Response

Successful response