서명 필드 배치
PUT /v1/documents/{id}/fields
문서의 서명 필드를 통째로 교체합니다(전체 셋을 보냅니다). draft 상태에서만 가능합니다.
본문 파라미터
fields 배열의 각 항목:
| 필드 | 타입 | 설명 |
|---|---|---|
participant_id |
string | 이 필드를 채울 서명자 |
type |
string | signature/seal/text/date/checkbox |
page |
int | 페이지 번호(1부터) |
x,y,width,height |
number | 0~1 비율 좌표 |
required |
bool | 필수 여부(기본 true) |
upload_only |
bool | seal 전용: 도장 이미지 업로드만 허용 |
요청 예시
curl https://api.pactery.com/v1/documents/doc_8sK2.../fields \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-X PUT \
-d '{
"fields": [
{ "participant_id": "par_1", "type": "signature", "page": 1, "x": 0.62, "y": 0.80, "width": 0.25, "height": 0.08 },
{ "participant_id": "par_2", "type": "seal", "page": 1, "x": 0.62, "y": 0.88, "width": 0.12, "height": 0.12, "upload_only": true }
]
}'