Correction

Los endpoints de Correction te permiten modificar documentos que ya fueron enviados para firma, siguiendo reglas de edición estilo DocuSign. Puedes anular documentos, agregar nuevos firmantes, o eliminar firmantes que aún no hayan firmado.


GET/v2/documents/{document_id}/correction-context

Correction context

Consulta qué operaciones de edición se pueden realizar sobre un documento activo. Las reglas dependen de cuántos firmantes ya han firmado.

Path parameters

  • Name
    document_id
    Type
    string
    Description

    ID del documento (UUID).

Request

GET
/v2/documents/{id}/correction-context
curl "https://api.allsign.io/v2/documents/DOC_UUID/correction-context" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK"

Response (200)

{
  "envelopeStatus": "ESPERANDO_FIRMAS",
  "canAddSigner": true,
  "isLocked": false,
  "signers": [
    {
      "id": "sig-uuid-1",
      "email": "firmante1@empresa.com",
      "status": "SIGNED",
      "canRemove": false
    },
    {
      "id": "sig-uuid-2",
      "email": "firmante2@empresa.com",
      "status": "WAITING_FOR_SIGNATURE",
      "canRemove": true
    }
  ]
}

POST/v2/documents/{document_id}/void

Void document

Anula un documento, cancelando todas las firmas pendientes. Las firmas ya completadas se conservan en el historial de auditoría.

Path parameters

  • Name
    document_id
    Type
    string
    Description

    ID del documento (UUID).

Request body

  • Name
    reason
    Type
    string
    Description

    Razón de la anulación (para auditoría).

Request

POST
/v2/documents/{id}/void
curl -X POST "https://api.allsign.io/v2/documents/DOC_UUID/void" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Se detectó un error en el contrato"}'

Response (200)

{
  "success": true,
  "message": "Documento anulado. 2 firma(s) pendiente(s) cancelada(s)."
}

Error — already completed (400)

{
  "error": {
    "code": "E1600",
    "type": "conflict",
    "message": "Cannot void a fully signed document."
  }
}

Error — already voided (400)

{
  "error": {
    "code": "E1600",
    "type": "conflict",
    "message": "Document is already voided or expired."
  }
}

POST/v2/documents/{document_id}/add-signer

Add signer

Agrega un nuevo firmante a un documento activo. El endpoint encuentra o crea al usuario dentro del tenant, otorga acceso al documento y crea el registro de firma.

Path parameters

  • Name
    document_id
    Type
    string
    Description

    ID del documento (UUID).

Request body

  • Name
    signer_email
    Type
    string
    Description

    Email del nuevo firmante. Se valida automáticamente (formato + entregabilidad).

  • Name
    signer_phone
    Type
    string
    Description

    Teléfono del firmante (para firmantes solo WhatsApp).

Request

POST
/v2/documents/{id}/add-signer
curl -X POST "https://api.allsign.io/v2/documents/DOC_UUID/add-signer" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK" \
  -H "Content-Type: application/json" \
  -d '{"signer_email": "nuevo-firmante@empresa.com"}'

Response (200) — Éxito

{
  "success": true,
  "message": "Firmante nuevo-firmante@empresa.com agregado correctamente."
}

Response (200) — Duplicado

{
  "success": false,
  "message": "El firmante ya está en la lista de firmantes."
}

Error — invalid email (422)

{
  "error": {
    "code": "E1200",
    "type": "validation_error",
    "message": "Invalid email format: 'bad-email'. Expected format: user@example.com",
    "field": "signer_email"
  }
}

DELETE/v2/documents/{document_id}/signers/{signature_id}

Remove signer

Elimina un firmante de un documento activo. Solo se puede eliminar firmantes que aún no han firmado.

Path parameters

  • Name
    document_id
    Type
    string
    Description

    ID del documento (UUID).

  • Name
    signature_id
    Type
    string
    Description

    ID de la firma a eliminar (UUID). Obtenerlo del correction context o del campo signersData.

curl -X DELETE "https://api.allsign.io/v2/documents/DOC_UUID/signers/SIG_UUID" \
  -H "Authorization: Bearer ALLSIGN_LIVE_SK"

Response (200)

{
  "success": true,
  "detail": "Firmante eliminado correctamente"
}

Error — already signed (400)

{
  "error": {
    "code": "E1700",
    "type": "bad_request",
    "message": "Cannot remove signer — signature already completed."
  }
}

Was this page helpful?