Replace Draft Fields
Whole-list replace. Translates the wire's nested position shape into the flat dict DocumentProcessor.normalize_fields expects -- see that method's docstring for why the shapes differ and normalize_fields' contract cannot change (the live tag-parse path depends on it too).
CONTRACT: the response's fields must contain exactly one entry per submitted field, in the SAME ORDER they were sent.
The editor reconciles this response to its own field list positionally (frontend/src/services/draftService.ts) and has no way to detect a violation -- it would silently apply one field's server-confirmed name to a different field, and that wrong name would be written back on the next autosave and carried into the signed document.
Nothing enforces this at the type level; it holds because every link is order-preserving by construction (the comprehension below, the one-append-per-input loop in normalize_fields, and returning that list directly rather than re-fetching). Do not add a sort, a group-by-page, or a position-dedupe step without also giving the client a stable per-field key to reconcile on instead. TestAutosaveFieldsHTTP's ordering tests pin this.
Request
- Base URL: https://zsign.io (the document declares no server; this is the origin it was published from)
- URL: https://zsign.io/api/documents/drafts/{document_id}/fields
- Auth: HTTP bearer
Path parameters
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.