# How to retrieve files
This section covers the signature API file types: which files are supported and how to download the signed files. We only store signed files for a limited time. Therefore, you have to make sure to download them as soon as they are signed.
# Supported file types
All the different file types can be a bit confusing at first, so it's a good idea to start by reviewing the list of supported file types.
# When is the file ready?
# The recommended approach
Use our notification API to be notified with webhooks or service bus messages when the document is ready.
# If you can't subscribe to webhooks
# Alternative 1
Let the signer wait for all the files to be ready. This can be achieved by overriding the default signature settings in the settings API. You can then download the file directly after the signer is redirected or after you receive the sign success web message.
# Alternative 2
Check if the document is ready by calling the document status endpoint. In the response you will see all the completed packages and if the document is signed.
GET https://api.signicat.io/signature/documents/{documentId}/status
Response sample
{
"documentStatus": "signed",
"completedPackages": [
"standard_packaging",
"pades"
],
"attachmentPackages": {}
}
# Retrieve file
# Main document
This endpoint delivers the main document file containing all the signatures. You can retrieve a file by specifying its document ID and which file type you want.
Example: A signature job is completed, the file to be signed was a PDF, so we want to fetch the PAdES file.
GET https://api.signicat.io/signature/documents/{documentId}/files
# Signer document
This endpoint can return the signed file for each signer (native or packaged) before they are merged together in one file.
GET https://api.signicat.io/signature/documents/{documentId}/files/signers/{signerId}
# Attachment documents
You can download the files for each of the signable attachments too.
# Document
GET https://api.signicat.io/signature/documents/{documentId}/files/attachments/{attachmentId}
# Signer
GET https://api.signicat.io/signature/documents/{documentId}/files/attachments/{attachmentId}/signers/{signerId}