# Invoice Inquiries

Using the `inquireInvoice` command, you can fetch a link to an invoice that has been generated previously.

This can be useful if:

* You prefer to invoke invoice generation asynchronously by setting `invoiceCreationMethod` to `post`, and make another API call later to retrieve the result.
* You need to retrieve a copy of an invoice for reporting purposes or based on a customer request.

The `inquireInvoice` command doesn't regenerate the invoice; it only returns a link to the invoice — the exact same link that the `addCgInvoice` command returns when you generate an invoice with the `invoiceCreationMethod` parameter set to `wait`.

To perform an invoice inquiry, send a [standard Hyp API request](/enterprise/introduction/request-and-response-general-structure.md). In the `int_in` parameter, include an XML payload for the `inquireInvoice` command. The XML payload should look like this:

```xml
<ashrait>
    <request>
        <version>2000</version>
        <language>ENG</language>
        <command>inquireInvoice</command>
        <inquireInvoice>
            <invoice>
                <invoiceAtranId>119328971</invoiceAtranId>
            </invoice>
        </inquireInvoice>
    </request>
</ashrait>
```

The structure of the response is the same as for the `addCgInvoice` command:

```xml
<?xml version='1.0'?>
<ashrait>
    <response>
        <command>inquireInvoice</command>
        <dateTime>2025-08-11 12:49</dateTime>
        <requestId/>
        <tranId>119396470</tranId>
        <result>000</result>
        <message>Permitted transaction</message>
        <userMessage>Permitted transaction</userMessage>
        <additionalInfo/>
        <version>2000</version>
        <language>Eng</language>
        <inquireInvoice>
            <status>000</status>
            <statusText>Permitted transaction</statusText>
            <originalInvoice>
                <invoiceCreationMethod>wait</invoiceCreationMethod>
                <invoiceResponseCode>100</invoiceResponseCode>
                <invoiceResponseName>Proper Invoice Request</invoiceResponseName>
                <invoiceDocNumber>145743</invoiceDocNumber>
                <invoiceDocUrl>
                    https://demo.ezcount.co.il/front/documents/get/6f349b47-d649-4e49-82b4-ba3f0f5fca04/copy_en
                </invoiceDocUrl>
                <invoiceAtranId>119396210</invoiceAtranId>
                <invoiceCreationDate>2025-08-11 12:36:04</invoiceCreationDate>
                <mailTo>example@acme.io</mailTo>
                <invoiceCreationCode>000</invoiceCreationCode>
                <cancelTransaction>0</cancelTransaction>
            </originalInvoice>
        </inquireInvoice>
    </response>
</ashrait>
```


---

# 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://developers.hyp.co.il/enterprise/documents-and-invoicing/invoice-inquiries.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.
