Introduction
The Digital Signatures API enables authenticated employees to create and manage their digital signature profiles, including signature images and organizational details. These signatures are used to authenticate pharmacovigilance documents and ICSR exports.Base URL
Authentication
All signature endpoints require employee authentication. The system automatically links signatures to the authenticated employee’s profile.Get My Signature Profile
Retrieve the signature profile for the authenticated employee. Creates a default profile if none exists.Response
Unique signature profile ID
Associated employee ID
Signer’s full name
Job title or position
Company or organization name
Phone number
Mobile phone number
Alternative email address
Company website URL
URL to company logo image
URL to handwritten signature image
Example Response
Update Signature Profile
Update signature profile information for the authenticated employee.Path Parameters
Signature profile ID (must belong to the authenticated employee)
Request Body
All fields are optional. Only provided fields will be updated.Full name of the signer
Job title or position
Company or organization name
Phone number
Mobile phone number
Phone extension
Alternative email address
Company website URL
Physical address
URL to company logo (cleaned automatically)
URL to signature image (cleaned automatically)
Social media links (key-value pairs)
Custom HTML signature template
Whether this is the default signature
UI preferences for signature display
Response
Returns the updated signature profile.Upload Signature Assets
Upload signature image or company logo.Path Parameters
Signature profile ID (must belong to authenticated employee)
Request Parameters
Image file to upload (PNG, JPG, or other image formats)
Asset type to upload:
"logo": Company logo"firma_img": Handwritten signature image
Response
Returns the updated signature profile with the new asset URL.Storage
Files are stored in:/uploads/ path.
Signature Usage in Documents
Signatures are automatically applied to documents in the following contexts:ICSR Export with Signature
When exporting ICSR reports to DIGEMID format, the signature profile of the authenticated user is embedded:GET /api/v1/icsr/{icsr_id}/export/digemid
- Signer’s name and job title
- Handwritten signature image (
firma_img_url) - Company logo (if configured)
- Contact information (phone, email)
- Company website
Signature Context in Exports
The following fields from the signature profile are included:| Field | Use in Export |
|---|---|
nombre | Displayed as signer name |
cargo | Job title below signature |
company | Organization name |
celular / telefono | Contact phone number |
email_alt | Contact email |
website | Company URL |
firma_img_url | Embedded signature image |
logo_url | Header/footer logo (optional) |
OTP Verification Workflow
For critical documents requiring OTP verification:- Initiate Export: User requests document export
- Generate OTP: System sends OTP code to registered email/phone
- Verify OTP: User provides OTP code
- Apply Signature: System embeds signature in document
- Generate Document: Final document with digital signature is created
OTP verification is handled by separate authentication endpoints and is automatically integrated with signature application.
Signature Image Guidelines
Recommended Specifications
- Format: PNG (transparent background) or JPG
- Dimensions: 300-500 pixels wide, 100-150 pixels high
- File Size: Under 500 KB
- DPI: 150-300 for print quality
- Background: Transparent PNG recommended
Creating a Digital Signature
- Sign on white paper with black/blue pen
- Scan at high resolution (300 DPI)
- Use image editing software to:
- Crop to signature only
- Remove background (make transparent)
- Adjust contrast for clarity
- Save as PNG with transparency
- Upload using the assets endpoint
Security Considerations
Access Control
- Employees can only view and update their own signature profiles
- Signature IDs are validated against the authenticated employee
- Unauthorized access returns 404 error
Data Protection
- Signature images are stored in employee-specific directories
- URLs are sanitized to prevent path traversal
- File uploads are validated for type and size
Audit Trail
When signatures are applied to documents:- The authenticated user’s ID is recorded
- Timestamp of signature application is logged
- Document export records include signer information
Error Codes
| Status Code | Description |
|---|---|
| 200 | Success - Signature retrieved or updated |
| 201 | Created - Asset uploaded successfully |
| 400 | Bad Request - Invalid field value or file format |
| 404 | Not Found - Signature profile not found or no permission |
| 500 | Internal Server Error - File storage or processing error |
Complete Example: Setting Up a Signature
Python
Related Endpoints
ICSR Export
Export ICSR reports with embedded signatures
Document Management
Create and manage documents