Home
Home
  1. Documents
  • Getting started
  • Authentication
  • Webhooks
  • Embeddable widgets
    • Overview
    • Document upload widget
      • Designing an upload flow
  • Guides
    • Verifying a new business
    • Verifying bank accounts
    • Uploading documents
    • Country-specific fields
    • Supported document types
  • API reference
    • Submissions
      • Reports
        • List available report templates
        • Download a report
      • Create new submission
      • Get submission
      • Update submission
      • Update submission status
      • Run a submission pre-flight check
      • Run business verification
      • Get submission checks
      • Delete submission
      • List submissions
    • Documents
      • Public documents API
        • List documents (public)
        • Upload document (public)
        • Get document (public)
        • Delete document (public)
        • Download document file (public)
        • Rerun validations (public)
      • List documents
        GET
      • Upload document
        POST
      • Get document
        GET
      • Delete document
        DELETE
      • Download document file
        GET
      • Rerun validations
        PUT
    • RPC search
      • RPC search
      • Get company with ID
      • Look up company by RFC
      • Search companies by name
      • Download RPC document
    • Utilities
      • Matcher
        • Run name matching
  1. Documents

Download document file

Production
https://api.niva.co/v1
Production
https://api.niva.co/v1
GET
https://api.niva.co/v1
/submissions/{submission_id}/documents/{document_id}/download
Redirects (302) to a temporary signed URL of the original file; follow it right away and do not store it. To download an original upload that was merged into another document, pass its merged_documents[].id. Documents Niva retrieved from a registry may have no file and return 404 Document file not available.
TIP
Fetch the Location URL without the apiKey header; the file host does not need it.

Request

Authorization
Add parameter in header
apiKey
Example:
apiKey: ********************
Path Params

Header Params

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.niva.co/v1/submissions/sub_3ZMd9KJnvAdYt4mOyW7YQRAp/documents/doc_MAXm5v0B7kZVHorQL8YjV2y9/download' \
--header 'Accept-Language: en' \
--header 'apiKey: <api-key>'

Responses

🔵302Found
Redirect to the document file
Headers

This response does not have a body.
🟠401Unauthorized
🟠404Not Found
🔴500Internal Server Error
Previous
Delete document
Next
Rerun validations