> For the complete documentation index, see [llms.txt](https://doklado-mnojd9vj.documentationai.com/llms.txt).
> Use it to discover all available pages before exploring further.

# Returns documents for selected date range


<PlaygroundComponent />

<AuthParams schemes={["apiKey"]}>
<AuthType scheme="apiKey">
<ParamField header="api_key" param-type="string" required="true">
API Key for authentication. Provide your API key in the header.
</ParamField>
</AuthType>
</AuthParams>

<BodyParams contentTypes={["application/json"]} defaultType="application/json">
  <ContentType type="application/json">
<ParamField showLocation="false" body="data" param-type="object" required="false">

<Expandable title="Object Properties" default-open="false">

  <ParamField showLocation="false" body="organizationId" param-type="string" required="false" examples-b64="W3sibmFtZSI6ImV4YW1wbGUiLCJ2YWx1ZSI6IjQ3ODQ3Nzg2In1d">
  Company identification number (IČO)
  </ParamField>

  <ParamField showLocation="false" body="isExported" param-type="boolean" required="false" examples-b64="W3sibmFtZSI6ImV4YW1wbGUiLCJ2YWx1ZSI6ZmFsc2V9XQ==">
  Get only documents with isExported status.
  </ParamField>

  <ParamField showLocation="false" body="dateFrom" param-type="string" required="false">
  Export documents from date.
  </ParamField>

  <ParamField showLocation="false" body="dateLastUpdated" param-type="string" required="false">
  Last updated time
  </ParamField>

  <ParamField showLocation="false" body="dateTo" param-type="string" required="false">
  Export documents until date.
  </ParamField>

  <ParamField showLocation="false" body="orderBy" param-type="string" required="false" enum="delivery_date,issue_date,creation_date">
  Order Documents
  </ParamField>

  <ParamField showLocation="false" body="orderByDescending" param-type="boolean" required="false" examples-b64="W3sibmFtZSI6ImV4YW1wbGUiLCJ2YWx1ZSI6ZmFsc2V9XQ==">

  </ParamField>

  <ParamField showLocation="false" body="resourceTypes" param-type="array" required="false">

  </ParamField>

  <ParamField showLocation="false" body="resourceSubType" param-type="array" required="false">
  Get specific subtyeps for documents
  </ParamField>

  <ParamField showLocation="false" body="searchAfter" param-type="array" required="false" examples-b64="W3sibmFtZSI6ImV4YW1wbGUiLCJ2YWx1ZSI6WyIyMDI1LTA2LTEyVDEyOjAwOjAwLjAwMCIsInpxdUxnZ0l2UTlWbXYzUzNuMkVSIl19XQ==">
  Tokens for paggination when sorting
  </ParamField>

  <ParamField showLocation="false" body="dateType" param-type="string" required="false" enum="create,issue,delivery,due">
  Get documents by issue, creation, due, delivery date.
  </ParamField>

  <ParamField showLocation="false" body="continuationToken" param-type="string" required="false">
  Token used for pagginationt
  </ParamField>

  <ParamField showLocation="false" body="approvalStatus" param-type="array" required="false" examples-b64="W3sibmFtZSI6ImV4YW1wbGUiLCJ2YWx1ZSI6W119XQ==">

  </ParamField>

  <ParamField showLocation="false" body="identificationNumber" param-type="string" required="false">
  Filter documents by counterparty identification number (IČO)
  </ParamField>

</Expandable>
</ParamField>
  </ContentType>
</BodyParams>

<Request tabs="curl,python,javascript,go,ruby">

```bash
curl -X POST "https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents" \
  -H "Content-Type: application/json" \
  -H "api_key: YOUR_API_KEY" \
  -d '{
  "data": {
    "organizationId": "47847786",
    "isExported": false,
    "dateFrom": "2024-12-25T10:00:00Z",
    "dateLastUpdated": "2024-12-25T10:00:00Z",
    "dateTo": "2024-12-25T10:00:00Z",
    "orderBy": "delivery_date",
    "orderByDescending": false,
    "resourceTypes": [
      "receipt"
    ],
    "resourceSubType": [
      "received_invoice"
    ],
    "searchAfter": [
      "2025-06-12T12:00:00.000",
      "zquLggIvQ9Vmv3S3n2ER"
    ],
    "dateType": "create",
    "continuationToken": "example_string",
    "approvalStatus": [],
    "identificationNumber": "example_string"
  }
}'
```

```python
import requests
import json

url = "https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents"
headers = {
  "Content-Type": "application/json",
  "api_key": "YOUR_API_KEY"
}
data = {
  "data": {
    "organizationId": "47847786",
    "isExported": false,
    "dateFrom": "2024-12-25T10:00:00Z",
    "dateLastUpdated": "2024-12-25T10:00:00Z",
    "dateTo": "2024-12-25T10:00:00Z",
    "orderBy": "delivery_date",
    "orderByDescending": false,
    "resourceTypes": [
      "receipt"
    ],
    "resourceSubType": [
      "received_invoice"
    ],
    "searchAfter": [
      "2025-06-12T12:00:00.000",
      "zquLggIvQ9Vmv3S3n2ER"
    ],
    "dateType": "create",
    "continuationToken": "example_string",
    "approvalStatus": [],
    "identificationNumber": "example_string"
  }
}

response = requests.post(url, headers=headers, json=data)
print(response.json())
```

```javascript
const response = await fetch("https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents", {
  method: "POST",
  headers: {
  "Content-Type": "application/json",
  "api_key": "YOUR_API_KEY"
},
  body: JSON.stringify({
  "data": {
    "organizationId": "47847786",
    "isExported": false,
    "dateFrom": "2024-12-25T10:00:00Z",
    "dateLastUpdated": "2024-12-25T10:00:00Z",
    "dateTo": "2024-12-25T10:00:00Z",
    "orderBy": "delivery_date",
    "orderByDescending": false,
    "resourceTypes": [
      "receipt"
    ],
    "resourceSubType": [
      "received_invoice"
    ],
    "searchAfter": [
      "2025-06-12T12:00:00.000",
      "zquLggIvQ9Vmv3S3n2ER"
    ],
    "dateType": "create",
    "continuationToken": "example_string",
    "approvalStatus": [],
    "identificationNumber": "example_string"
  }
})
});

const data = await response.json();
console.log(data);
```

```go
package main

import (
    "fmt"
    "net/http"
    "bytes"
    "encoding/json"
)

func main() {
    data := []byte(`{
  "data": {
    "organizationId": "47847786",
    "isExported": false,
    "dateFrom": "2024-12-25T10:00:00Z",
    "dateLastUpdated": "2024-12-25T10:00:00Z",
    "dateTo": "2024-12-25T10:00:00Z",
    "orderBy": "delivery_date",
    "orderByDescending": false,
    "resourceTypes": [
      "receipt"
    ],
    "resourceSubType": [
      "received_invoice"
    ],
    "searchAfter": [
      "2025-06-12T12:00:00.000",
      "zquLggIvQ9Vmv3S3n2ER"
    ],
    "dateType": "create",
    "continuationToken": "example_string",
    "approvalStatus": [],
    "identificationNumber": "example_string"
  }
}`)

    req, err := http.NewRequest("POST", "https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents", bytes.NewBuffer(data))
    if err != nil {
        panic(err)
    }

    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("api_key", "YOUR_API_KEY")

    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    fmt.Println("Response Status:", resp.Status)
}
```

```ruby
require 'net/http'
require 'json'

uri = URI('https://api-gateway-prod-europe-west-1-7epuecvu.ew.gateway.dev/v2/documents')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['api_key'] = 'YOUR_API_KEY'
request.body = '{
  "data": {
    "organizationId": "47847786",
    "isExported": false,
    "dateFrom": "2024-12-25T10:00:00Z",
    "dateLastUpdated": "2024-12-25T10:00:00Z",
    "dateTo": "2024-12-25T10:00:00Z",
    "orderBy": "delivery_date",
    "orderByDescending": false,
    "resourceTypes": [
      "receipt"
    ],
    "resourceSubType": [
      "received_invoice"
    ],
    "searchAfter": [
      "2025-06-12T12:00:00.000",
      "zquLggIvQ9Vmv3S3n2ER"
    ],
    "dateType": "create",
    "continuationToken": "example_string",
    "approvalStatus": [],
    "identificationNumber": "example_string"
  }
}'

response = http.request(request)
puts response.body
```

</Request>

### Responses

<div data-component="ResponsesCollection"><Expandable title="200 - Successful operation" default-open="true">

<ResponseField name="success" field-type="boolean" required="false">

</ResponseField>

<ResponseField name="code" field-type="string" required="false" enum="APP_UNAUTHENTICATED,APP_INCORRECT_INPUT_DATA,APP_ORGANIZATION_NOT_FOUND_CODE,APP_MAX_EXPORT_LIMIT_EXCEEDED,APP_READ_DATA_ERROR,APP_NO_MORE_DATA">
- `APP_INCORRECT_INPUT_DATA` - The APP\_INCORRECT\_INPUT\_DATA status indicates that the selected filter or input criteria provided to the application are invalid or incorrect. . This status typically arises when users or systems submit input data that does not conform to the expected format, range, or validation rules defined by the application.
- `APP_NO_MORE_DATA` - Status indicates that there are no more data available to be fetched or processed by the application at the current point in time. This status typically occurs in scenarios involving pagination or sequential data retrieval, where the application has reached the end of available data.
- `APP_MAX_EXPORT_LIMIT_EXCEEDED` - Status indicates that the maximum export limit(2000) per API request has been exceeded.
- `APP_ORGANIZATION_NOT_FOUND_CODE` -  Status indicates that the requested organization could not be found in the system based on the provided identification number (ICO - Identification Number of Legal Entity/Organization).
- `APP_READ_DATA_ERROR` - Status indicates an undefined error occurred while attempting to read data from the application.
</ResponseField>

<ResponseField name="data" field-type="string[]" required="false">

</ResponseField>

<ResponseField name="continuationToken" field-type="string" required="false">
Token for paggination
</ResponseField>

<ResponseField name="searchAfter" field-type="string[]" required="false">
Tokens for paggination when sorting
</ResponseField>

</Expandable>

<Expandable title="403 - Not authorized" default-open="false">

*Not authorized*

</Expandable>

<Expandable title="404 - Not found" default-open="false">

*Not found*

</Expandable>

<Expandable title="500 - Server invocation error" default-open="false">

*Server invocation error*

</Expandable>

</div>

<Response tabs={["200","403","404","500"]} dropdown="true">

```json
{
  "success": true,
  "code": "APP_UNAUTHENTICATED",
  "data": [
    {
      "documentId": "b184lOqCeR7zJfmc04tV",
      "type": "receipt",
      "subType": "manual_domestic_received",
      "paymentStatus": "paid",
      "receiptUID": "O-A7DAAF78DE354C989AAF78DE351C98D7",
      "issuedAt": "2024-12-25T10:00:00Z",
      "taxPointDate": "2024-12-25T10:00:00Z",
      "createdAt": "2024-12-25T10:00:00Z",
      "totalPrice": 29.99,
      "vatCategory": "undefined",
      "approvalStatus": "default",
      "organizationId": "example_string",
      "organizationVatId": "example_string",
      "organizationTaxId": "example_string",
      "organizationName": "John Doe",
      "note": "example_string",
      "customText": "example_string",
      "internalNote": "example_string",
      "email": "user@example.com",
      "invoiceNumber": "example_string",
      "invoiceNumberV2": "example_string",
      "paymentType": "cash",
      "items": [
        {
          "name": "Vegánske kornútiky",
          "price": 2.5,
          "quantity": 10,
          "vatRate": 20,
          "itemType": "advance_payment",
          "unit": "ks",
          "vatAmount": 20,
          "note": "poznamka",
          "vatCategory": "undefined",
          "accountingSettings": {
            "accountingItem": {
              "accountingSoftwareId": 1,
              "value": "Naklady",
              "recalculate": false,
              "creditAccount": 502,
              "debitAccount": 302,
              "code": "2N",
              "ratioAllocation": {
                "recalculateVat50_50": false,
                "taxable": {
                  "value": "example_string",
                  "ratio": 80
                },
                "nonTaxable": {
                  "value": "example_string",
                  "ratio": 20
                }
              },
              "resourceType": "receipt"
            },
            "numericCode": {
              "accountingSoftwareId": 1,
              "value": "domestic",
              "name": "Vseobecny ciselny rad",
              "paymentType": "transfer"
            },
            "cashRegister": {
              "accountingSoftwareId": 1,
              "value": "cash_register",
              "name": "Pokladna EU"
            },
            "projects": {
              "accountingSoftwareId": 1,
              "value": "project_ZA",
              "note": "Stavba mostu"
            },
            "order": {
              "accountingSoftwareId": "example_string",
              "value": "order_bridge",
              "code": "COM",
              "name": "order 1"
            },
            "activity": {
              "accountingSoftwareId": 2,
              "value": "activity_test",
              "code": "JULO"
            },
            "expenditureCenter": {
              "accountingSoftwareId": 1,
              "value": "expenditure center",
              "code": "EXIT"
            },
            "generalDocumentAgenda": {
              "accountingSoftwareId": 1,
              "name": "document type",
              "code": "EXIT"
            },
            "predefinedNote": {
              "accountingSoftwareId": 1,
              "value": "document type"
            },
            "classificationVat": {
              "resourceTypeFlags": [
                "received_receipt"
              ],
              "accountingSoftwareId": 1,
              "name": "document type",
              "code": "EXIT",
              "validFrom": "2024-12-25T10:00:00Z",
              "validTo": "2024-12-25T10:00:00Z",
              "isReverseCharge": true
            },
            "bankAccountInfo": {
              "accountingSoftwareId": 1,
              "name": "VUB bank",
              "code": "JUL",
              "accountIdentification": "SK456"
            },
            "classificationKVVat": {
              "accountingSoftwareId": 1,
              "name": "Prijaté zjednodušené faktúry podľa §74...",
              "code": "B3"
            }
          }
        }
      ],
      "address": {
        "streetName": "Einsteinova",
        "propertyRegistrationNumber": "60",
        "buildingNumber": "30",
        "postalCode": "85101",
        "municipality": "Bratislava - mestská časť Petržalka",
        "country": "Slovensko"
      },
      "accountingSettings": {
        "accountingItem": {
          "accountingSoftwareId": 1,
          "value": "Naklady",
          "recalculate": false,
          "creditAccount": 502,
          "debitAccount": 302,
          "code": "2N",
          "ratioAllocation": {
            "recalculateVat50_50": false,
            "taxable": {
              "value": "example_string",
              "ratio": 80
            },
            "nonTaxable": {
              "value": "example_string",
              "ratio": 20
            }
          },
          "resourceType": "receipt"
        },
        "numericCode": {
          "accountingSoftwareId": 1,
          "value": "domestic",
          "name": "Vseobecny ciselny rad",
          "paymentType": "transfer"
        },
        "cashRegister": {
          "accountingSoftwareId": 1,
          "value": "cash_register",
          "name": "Pokladna EU"
        },
        "projects": {
          "accountingSoftwareId": 1,
          "value": "project_ZA",
          "note": "Stavba mostu"
        },
        "order": {
          "accountingSoftwareId": "example_string",
          "value": "order_bridge",
          "code": "COM",
          "name": "order 1"
        },
        "activity": {
          "accountingSoftwareId": 2,
          "value": "activity_test",
          "code": "JULO"
        },
        "expenditureCenter": {
          "accountingSoftwareId": 1,
          "value": "expenditure center",
          "code": "EXIT"
        },
        "generalDocumentAgenda": {
          "accountingSoftwareId": 1,
          "name": "document type",
          "code": "EXIT"
        },
        "predefinedNote": {
          "accountingSoftwareId": 1,
          "value": "document type"
        },
        "classificationVat": {
          "resourceTypeFlags": [
            "received_receipt"
          ],
          "accountingSoftwareId": 1,
          "name": "document type",
          "code": "EXIT",
          "validFrom": "2024-12-25T10:00:00Z",
          "validTo": "2024-12-25T10:00:00Z",
          "isReverseCharge": true
        },
        "bankAccountInfo": {
          "accountingSoftwareId": 1,
          "name": "VUB bank",
          "code": "JUL",
          "accountIdentification": "SK456"
        },
        "classificationKVVat": {
          "accountingSoftwareId": 1,
          "name": "Prijaté zjednodušené faktúry podľa §74...",
          "code": "B3"
        }
      },
      "exchangeRate": 3.14,
      "otherCurrency": "example_string",
      "otherTotalPrice": 29.99,
      "vatSummary": [
        {
          "taxBase": 3.14,
          "vatAmount": 3.14,
          "vatRate": 3.14
        }
      ],
      "ossSettings": {
        "countryCode": "de",
        "ossEvidentaryResource": "A",
        "ossServiceType": "BA"
      }
    }
  ],
  "continuationToken": "example_string",
  "searchAfter": [
    "2025-06-12T12:00:00.000",
    "zquLggIvQ9Vmv3S3n2ER"
  ]
}
```

```json
{
  "error": "Forbidden",
  "message": "You don't have permission to access this resource",
  "code": 403
}
```

```json
{
  "error": "Not Found",
  "message": "The requested resource was not found",
  "code": 404
}
```

```json
{
  "error": "Internal Server Error",
  "message": "An unexpected error occurred on the server",
  "code": 500,
  "requestId": "req_1234567890"
}
```

</Response>

