|
Http Verb |
POST |
|---|---|
|
Url |
/work-orders/permits/r1/obtained/{obtainedPermitId}/attachments |
|
Permissions required |
Permit: Edit ( |
|
Personally Identifiable Information (PII) |
No |
|
Sensitive Information |
No |
|
Last Modified Version |
r1 |
|
Released since |
2026 W3 (FSM 24.0) |
|
Deprecated since |
|
|
Removed since |
|
|
Tech Tags |
|
Business Logic
This API link a new attachment to the given obtained permit.
Please note that if you want to create an attachment for a obtained permit, the file must be created beforehand using the POST /documents/r1/files API.
Validation Flow:
-
Permit validity check: it rejects if cancelled is null or true, throwing
PERMIT_0032. -
Date consistency check: It verifies dueDate and obtainedDate are both present or both absent.
-
If only one is set, it throws
PERMIT_0033
-
-
Work order status check: It loads related RequiredPermit and WorkOrderHeader, rejecting if WO state is CLOSED, CANCELLED, ALIGNED, or TECHNICALLY_CLOSED, throwing OBTAINED_PERMIT_WO_STATUS_INVALID.
Header Parameters
Default.
Request Body Parameters
|
Field |
Validations |
Note |
|---|---|---|
|
uuid |
|
|
|
documentCategoryId |
Referenced resource id existence check |
This field is optional in the request payload. However, if it is not provided, a default value must be configured in the system settings (the value must not be null during processing) |
Response documentation
Response payload fields
|
Field |
Note |
Example value |
|---|---|---|
|
payload |
|
|
Response error codes
NOT_FOUND, BASE_0001, DOCUMENTS_002, PERMIT_0015, PERMIT_0032, PERMIT_0033