> For the complete documentation index, see [llms.txt](https://developers.hyp.co.il/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.hyp.co.il/enterprise/documents-and-invoicing/invoice-inquiries.md).

# 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 Enterprise API request](https://developers.hyp.co.il/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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.hyp.co.il/enterprise/documents-and-invoicing/invoice-inquiries.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
