Home
Home
  1. Public documents API
  • 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)
          GET
        • Upload document (public)
          POST
        • Get document (public)
          GET
        • Delete document (public)
          DELETE
        • Download document file (public)
          GET
        • Rerun validations (public)
          PUT
      • 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. Public documents API

Download document file (public)

Production
https://api.niva.co/v1
Production
https://api.niva.co/v1
GET
https://api.niva.co/v1
/public/submissions/{submission_token}/documents/{document_id}/download
Redirects (302) to a temporary signed URL of the original file; follow it right away and do not store it. A merged_documents[].id downloads an original upload that was merged. Send your public API key in the apiKey header and the submission's token in the path; see Public Documents API. Otherwise this endpoint behaves exactly like its private counterpart.

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/public/submissions/YOUR_SUBMISSION_TOKEN/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 (public)
Next
Rerun validations (public)