# Retrieve

## Retrieve Submission Status

You can retrieve the status of a submitted document using this API.

## API Referance

<mark style="color:green;">`GET`</mark> `/api/retrieve`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

<table><thead><tr><th width="279">Name</th><th width="143">Type</th><th width="116">Validation</th><th>Description</th></tr></thead><tbody><tr><td><p></p><pre class="language-postman_json"><code class="lang-postman_json">DocumentId
</code></pre></td><td>string</td><td>Mandatory</td><td>Invoice ID, eg:"SMM10"</td></tr><tr><td><pre><code>documentType
</code></pre></td><td>string</td><td>Mandatory</td><td>eg:SimplifiedInvoice</td></tr><tr><td><pre><code>issueDate
</code></pre></td><td>date</td><td>Mandatory</td><td><p>eg: </p><pre class="language-postman_json"><code class="lang-postman_json">2022-09-07
</code></pre></td></tr></tbody></table>

**Samples**

{% tabs %}
{% tab title="Sample Request" %}

```json
{
    "DocumentId" : "SM233",
    "documentType" : "SimplifiedInvoice",
    "issueDate" : "2022-09-08"
}

```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample success response" %}

```json
{
    "status": "success",
    "data": [
        {
            "DocumentId": "1",
            "issueDate": "2022-09-08",
            "isSubmittedToZatca": 2
        },
        {
            "DocumentId": "1",
            "issueDate": "2022-09-08",
            "isSubmittedToZatca": 2
        }

    ]
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Sample Error Response" %}

```json
{
    "status": "false",
    "data": [
        "No record found"
    ]
}
```

{% endtab %}
{% endtabs %}

{% hint style="success" %}

```
isSubmittedToZatca 1 Means Submitted
isSubmittedToZatca 0 Means Not submitted
isSubmittedToZatca 2 means Submitted with warning
```

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stackcue.gitbook.io/stackcue-docs/get-started/let-us-integrate-to-zatca/retrieve.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
