# General document export

You can request documents of several types in several formats in combination with settings as includes.
See tables bellow for possibilities and settings. Export is processed asynchronously. 
See how [Asynchronous
requests](https://developers.shoptet.com/asynchronous-requests/) work on our developer's portal.


|Document type       | Document format          | Parameters         | Includes
-------------------- | ------------------------ | ------------------ | ---------------------------------
|invoice             | csvDetail                | codeFrom           | exportWithHistoricalVat          
|                    | xlsDetail                | codeTo             | exportAsForeignCurrency      
|                    | pdf                      | dateFrom           | linkProformaInvoices        
|                    | isdoc                    | dateTo             | descOrder                   
|                    | xmlPohodaCz              | taxDateFrom        |                             
|                    | xmlPohodaSk              | taxDateTo          |                             
|                    | xmlMoneyS3CZ             | currency           |                             
|                    | xmlMoneyS3Sk             |                    |                             
|                    | xlsxSummary              |                    |                             
|                    | csvSummary               |                    |         
|proformaInvoice     | csvDetail                | codeFrom           | exportWithHistoricalVat     
|                    | xlsDetail                | codeTo             | exportAsForeignCurrency     
|                    | pdf                      | dateFrom           |                             
|                    | xmlPohodaCz              | dateTo             |                             
|                    | xmlPohodaSk              | taxDateFrom        |                            
|                    | xmlMoneyS3CZ             | taxDateTo          |                            
|                    | xmlMoneyS3Sk             | currency           |                            
|                    | xlsxSummary              |                   |                             
|                    | csvSummary               |                   |         
|creditNote          | csvDetail                | codeFrom           | exportWithHistoricalVat    
|                    | xlsDetail                | codeTo             | exportAsForeignCurrency    
|                    | pdf                      | dateFrom           |                            
|                    | isdoc                    | dateTo             |                            
|                    | xmlPohodaCz              | taxDateFrom        |                            
|                    | xmlPohodaSk              | taxDateTo          |                            
|                    | xmlMoneyS3CZ             | currency           |                            
|                    | xmlMoneyS3Sk             |                    |                            
|                    | xlsxSummary              |                    |                            
|                    | csvSummary               |                    |        
|proofPayment        | xmlPohodaCz              | codeFrom           | exportWithHistoricalVat    
|                    | xmlPohodaSk              | codeTo             | exportAsForeignCurrency    
|                    | csvDetail                | dateFrom           | onlyClosedProofPayments    
|                    | xlsDetail                | dateTo             |                            
|                    | pdf                      | taxDateFrom        |                            
|                    |                         | taxDateTo           |                            
|                    |                         | currency            |      
|deliveryNote        | csvDetail                | codeFrom           |                            
|                    | xlsDetail                | codeTo             |                            
|                    | pdf                      | dateFrom           |                            
|                    |                          | dateTo             |                            
|                    |                          | taxDateFrom        |                            
|                    |                          | taxDateTo          |                                 


|Include | Does
|------- | -----
|exportWithHistoricalVat | Will export historical rates.
|exportAsForeignCurrency | Currency will be exported as foreign regardless of e-shop settings.
|linkProformaInvoices | Corresponding proforma invoices will be added to export file.
|onlyClosedProofPayments | Exports only finished documents.
|descOrder | Sort as starting from oldest

Endpoint: GET /api/export/{type}/{format}
Version: 1.0.0
Security: shoptetAccessToken, shoptetPrivateApiToken

## Path parameters:

  - `type` (string, required)
    See tables for all document types
    Example: "proofPayment"

  - `format` (string, required)
    See tables for all document formats
    Example: "xmlPohodaCz"

## Query parameters:

  - `currency` (string)
    Mandatory except for Delivery notes
    Example: "czk"

  - `codeFrom` (string)
    Example: "2018000004"

  - `codeTo` (string)
    Example: "2018000006"

  - `dateFrom` (string)
    Example: "2022-12-12T22:08:01+0100"

  - `dateTo` (string)
    Example: "2023-12-12T22:08:01+0100"

  - `taxDateFrom` (string)
    Example: "2022-12-12T22:08:01+0100"

  - `taxDateTo` (string)
    Example: "2023-12-12T22:08:01+0100"

  - `include` (string)
    Sections to include
    Example: "exportWithHistoricalVat, exportAsForeignCurrency, linkProformaInvoices, onlyClosedProofPayments, descOrder"

## Header parameters:

  - `Content-Type` (string, required)

## Response 202 fields (application/json):

  - `data` (object)

  - `data.jobId` (string, required)
    token of job

  - `errors` (array,null)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.


