Signature Fields

Los endpoints de Signature Fields te permiten posicionar campos de firma en tus PDFs. Puedes usar coordenadas absolutas, texto de referencia (anchorString), o colocar campos en todas las páginas.


POST/v2/documents/{document_id}/signature-fields

Add field

Añade un campo de firma a un documento.

Request body

  • Name
    signerEmail
    Type
    string
    Description

    Email del firmante asignado a este campo.

  • Name
    pageNumber
    Type
    integer
    Description

    Número de página donde colocar el campo (1-indexed).

  • Name
    x
    Type
    number
    Description

    Coordenada X del campo.

  • Name
    y
    Type
    number
    Description

    Coordenada Y del campo.

  • Name
    width
    Type
    number
    Description

    Ancho del campo. Default: 200.

  • Name
    height
    Type
    number
    Description

    Alto del campo. Default: 100.

  • Name
    anchorString
    Type
    string
    Description

    Texto exacto del PDF para usar como referencia de posición.

  • Name
    includeInAllPages
    Type
    boolean
    Description

    Si true, el campo aparece en todas las páginas. Default: false.

  • Name
    totalPages
    Type
    integer
    Description

    Total de páginas del documento. Requerido cuando includeInAllPages=true.

  • Name
    excludeFromPages
    Type
    array
    Description

    Páginas a excluir cuando includeInAllPages=true (1-indexed).

  • Name
    type
    Type
    string
    Description

    Tipo de campo. Default: signatureField.

Request

POST
/v2/documents/{id}/signature-fields
curl -X POST "https://api.allsign.io/v2/documents/DOC_UUID/signature-fields" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "signerEmail": "firmante@empresa.com",
    "pageNumber": 2,
    "x": 100,
    "y": 650,
    "width": 200,
    "height": 100
  }'

PUT/v2/documents/{document_id}/signature-fields

Update field

Actualiza la posición, página o configuración de un campo de firma existente.

Request body

  • Name
    fieldId
    Type
    string
    Description

    ID del campo a actualizar (UUID).

  • Name
    signerEmail
    Type
    string
    Description

    Email del firmante dueño del campo.

  • Name
    x
    Type
    number
    Description

    Nueva coordenada X.

  • Name
    y
    Type
    number
    Description

    Nueva coordenada Y.

  • Name
    pageNumber
    Type
    integer
    Description

    Nuevo número de página.

  • Name
    includeInAllPages
    Type
    boolean
    Description

    Cambiar si aparece en todas las páginas.

curl -X PUT "https://api.allsign.io/v2/documents/DOC_UUID/signature-fields" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "fieldId": "FIELD_UUID",
    "signerEmail": "firmante@empresa.com",
    "x": 200,
    "y": 700
  }'

DELETE/v2/documents/{document_id}/signature-fields

Delete field

Elimina un campo de firma de un documento.

Request body

  • Name
    fieldId
    Type
    string
    Description

    ID del campo a eliminar (UUID).

  • Name
    signerEmail
    Type
    string
    Description

    Email del firmante dueño del campo.

  • Name
    deleteLinkedFields
    Type
    boolean
    Description

    Si true, elimina también campos vinculados (ej. campos en todas las páginas). Default: false.

curl -X DELETE "https://api.allsign.io/v2/documents/DOC_UUID/signature-fields" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{
    "fieldId": "FIELD_UUID",
    "signerEmail": "firmante@empresa.com",
    "deleteLinkedFields": false
  }'

Was this page helpful?