> 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.

# Get received document detail

Stiahnutie metadát a XML. Samo o sebe nemení stav na ACKNOWLEDGED.


<PlaygroundComponent />

<AuthParams schemes={["bearerAuth"]}>
<AuthType scheme="bearerAuth">
<ParamField header="Authorization" param-type="string" required="true">
Bearer token (JWT). Authentication token required.
</ParamField>
</AuthType>
</AuthParams>

### Path Parameters

<ParamField showLocation="false" path="documentId" param-type="string" required="true">
Identifikátor z documents\[].documentId.
</ParamField>

### Headers

<ParamField showLocation="false" header="X-Peppol-Participant-Id" param-type="string" required="true">
Firma oprávnená na operáciu; pri odoslaní sa zhoduje s metadata.senderParticipantId.
</ParamField>

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

```bash
curl -X GET "https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/document/receive/example_string" \
  -H "Content-Type: application/json" \
  -H "X-Peppol-Participant-Id: example_string" \
  -H "Authorization: Bearer YOUR_API_TOKEN (JWT)"
```

```python
import requests
import json

url = "https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/document/receive/example_string"
headers = {
  "Content-Type": "application/json",
  "X-Peppol-Participant-Id": "example_string",
  "Authorization": "Bearer YOUR_API_TOKEN (JWT)"
}

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

```javascript
const response = await fetch("https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/document/receive/example_string", {
  method: "GET",
  headers: {
  "Content-Type": "application/json",
  "X-Peppol-Participant-Id": "example_string",
  "Authorization": "Bearer YOUR_API_TOKEN (JWT)"
}
});

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

```go
package main

import (
    "fmt"
    "net/http"
)

func main() {

    req, err := http.NewRequest("GET", "https://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/document/receive/example_string", nil)
    if err != nil {
        panic(err)
    }

    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("X-Peppol-Participant-Id", "example_string")
    req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")

    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://einvoice-v1-ynyiur6quq-ey.a.run.app/v1/sapi/document/receive/example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true

request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['X-Peppol-Participant-Id'] = 'example_string'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'

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

</Request>

### Responses

<div data-component="ResponsesCollection"><Expandable title="200 - Úspešná odpoveď podľa V1." default-open="true">

<ResponseField name="metadata" field-type="object" required="false">

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

<ResponseField name="documentId" field-type="string" required="false">
Identifikátor pridelený Doklado; použite ho pri detaile a acknowledge.
</ResponseField>

<ResponseField name="documentTypeId" field-type="string" required="false">
Úplný Peppol Document Type Identifier.
</ResponseField>

<ResponseField name="processId" field-type="string" required="false">
Peppol Process Identifier.
</ResponseField>

<ResponseField name="senderParticipantId" field-type="string" required="false">
Peppol ID odosielateľa vo formáte schemeId:identifier.
</ResponseField>

<ResponseField name="receiverParticipantId" field-type="string" required="false">
Peppol ID príjemcu vo formáte schemeId:identifier.
</ResponseField>

<ResponseField name="clientDocumentId" field-type="string" required="false">
Identifikátor dokumentu pridelený klientom.
</ResponseField>

<ResponseField name="receivedAt" field-type="string" required="false">

</ResponseField>

<ResponseField name="status" field-type="string" required="false" enum="RECEIVED,ACKNOWLEDGED">

</ResponseField>

<ResponseField name="payloadFormat" field-type="string" required="false" enum="XML">

</ResponseField>

</Expandable>
</ResponseField>

<ResponseField name="payload" field-type="string" required="false">
XML obsah dokumentu.
</ResponseField>

<ResponseField name="payloadFormat" field-type="string" required="false" enum="XML">

</ResponseField>

<ResponseField name="payloadEncoding" field-type="string" required="false">

</ResponseField>

<ResponseField name="checksum" field-type="string" required="false">
Kontrolný súčet uvedený v príklade V1.
</ResponseField>

</Expandable>

<Expandable title="400 - Neplatný request, kurzor, limit alebo status." default-open="false">

*Neplatný request, kurzor, limit alebo status.*

</Expandable>

<Expandable title="401 - Neplatný token." default-open="false">

*Neplatný token.*

</Expandable>

<Expandable title="403 - Chýbajúce oprávnenie pre Participant ID." default-open="false">

*Chýbajúce oprávnenie pre Participant ID.*

</Expandable>

<Expandable title="404 - Dokument neexistuje alebo nepatrí do kontextu klienta." default-open="false">

*Dokument neexistuje alebo nepatrí do kontextu klienta.*

</Expandable>

<Expandable title="409 - Nepovolený stav dokumentu." default-open="false">

*Nepovolený stav dokumentu.*

</Expandable>

<Expandable title="429 - Prekročený rate limit." default-open="false">

*Prekročený rate limit.*

</Expandable>

<Expandable title="500 - Interná chyba." default-open="false">

*Interná chyba.*

</Expandable>

<Expandable title="503 - Dočasná nedostupnosť služby." default-open="false">

*Dočasná nedostupnosť služby.*

</Expandable>

</div>

<Response tabs={["200","400","401","403","404","409","429","500","503"]} dropdown="true">

```json
{
  "metadata": {
    "documentId": "example_string",
    "documentTypeId": "example_string",
    "processId": "example_string",
    "senderParticipantId": "example_string",
    "receiverParticipantId": "example_string",
    "clientDocumentId": "example_string",
    "receivedAt": "2024-12-25T10:00:00Z",
    "status": "RECEIVED",
    "payloadFormat": "XML"
  },
  "payload": "example_string",
  "payloadFormat": "XML",
  "payloadEncoding": "example_string",
  "checksum": "example_string"
}
```

```json
{
  "error": "Bad Request",
  "message": "The request contains invalid parameters or malformed data",
  "code": 400,
  "details": [
    {
      "field": "email",
      "message": "Invalid email format"
    }
  ]
}
```

```json
{
  "error": "Unauthorized",
  "message": "Authentication required. Please provide a valid API token",
  "code": 401
}
```

```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": "Conflict",
  "message": "The request conflicts with the current state of the resource",
  "code": 409,
  "details": "Resource already exists"
}
```

```json
{
  "error": "Too Many Requests",
  "message": "Rate limit exceeded. Please try again later",
  "code": 429,
  "retryAfter": 3600
}
```

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

```json
{
  "error": "Service Unavailable",
  "message": "The service is temporarily unavailable. Please try again later",
  "code": 503
}
```

</Response>

