---
title: "Retrieve document from archive"
slug: "retrieve-document-from-archive"
updated: 2026-01-09T07:50:19Z
published: 2026-01-09T07:50:35Z
canonical: "products.egfabri.cloud/retrieve-document-from-archive"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://products.egfabri.cloud/llms.txt
> Use this file to discover all available pages before exploring further.
# Retrieve document from archive
Get/BSAPIRestproxy/api/archive/types/{docType}/documents/{documentId}
Fetches an archived document of the given type, number and year for a specific organization and shop. The document is returned as a binary file (PDF) with appropriate Content-Type and headers.
Path parametersdocTypestringRequired
Type of document (e.g. INVOICE, PACKNOTE, ORDER)
ExamplePACKNOTE
documentIdstringRequired
Document number in the archive
Example535881-0
Query parametersyearinteger (int32) Required
Year associated with the document
Example2025
orginteger (int64) Required
Organization number
Example98765478
shopinteger (int64) Required
Shop number
Example7654321076548
Responses200
Document retrieved successfully
string (binary)
400
Invalid request parameters
object
Standard error payload
timestampstring (date-time) Example2025-10-08T19:34:12.345Z
statusinteger (int32) Example404
errorstring ExampleNot Found
messagestring ExampleNo document returned from bs-api
pathstring Example/api/archive/types/INVOICE/documents/536062
upstreamstring Examplebs-api SOAP fault: Client.ValidationError
404
Document not found in the archive
object
Standard error payload
timestampstring (date-time) Example2025-10-08T19:34:12.345Z
statusinteger (int32) Example404
errorstring ExampleNot Found
messagestring ExampleNo document returned from bs-api
pathstring Example/api/archive/types/INVOICE/documents/536062
upstreamstring Examplebs-api SOAP fault: Client.ValidationError
500
Internal server error
object
Standard error payload
timestampstring (date-time) Example2025-10-08T19:34:12.345Z
statusinteger (int32) Example404
errorstring ExampleNot Found
messagestring ExampleNo document returned from bs-api
pathstring Example/api/archive/types/INVOICE/documents/536062
upstreamstring Examplebs-api SOAP fault: Client.ValidationError
502
Upstream SOAP service error (bs-api)
object
Standard error payload
timestampstring (date-time) Example2025-10-08T19:34:12.345Z
statusinteger (int32) Example404
errorstring ExampleNot Found
messagestring ExampleNo document returned from bs-api
pathstring Example/api/archive/types/INVOICE/documents/536062
upstreamstring Examplebs-api SOAP fault: Client.ValidationError