Retrieving Document Information Within a Date Range (Query Invoice Documents)
Use this function to retrieve information about a specific customer's documents, a specific document type, or all documents issued within a defined date range. The function can also be used to collect information and import it into the merchant's CRM or interface.
When should this function be used?
Businesses that want to retrieve information about the documents of a specific customer, a specific document type, or all documents within a specific date range can use this function.
This function can also be used to collect information and import it into the merchant's CRM system or interface.
Note: It is not possible to retrieve the line-item details of a document using this function.
What does this function return?
The function returns an array of documents containing the following information:
- Customer name
- Document amount
- Document date
- Customer email address
- Document comments
The array provides convenient and focused access to the relevant document details.
JSON function reference:
Request method: POST
https://secure.cardcom.solutions/api/v11/Documents/GetReport
The following parameters must be sent to the Query invoice documents function.
Legend:
Red parameter - required
Bold parameter - recommended
Parameter that is neither red nor bold - optional
| No. | Parameter | Example values | Description |
|---|---|---|---|
| 1 | ApiName | "test2025" | Interface username. This parameter must be obtained from the business. |
| 2 | ApiPassword | "kzFKfohEvL6AOF8aMEJz" | API password, intended for crediting and canceling transactions. |
| 3 | FromDate | "2025/03/23" | Date from which to begin searching for documents. |
| 4 | ToDate | "2025/03/25" | Date through which to search for documents. |
| 5 | FromDateYYYYMMDD | "20250324" | Date from which to begin searching for documents. |
| 6 | ToDateYYYYMMDD | "20250325" | Date through which to search for documents. |
| 7 | AccountId | 6549 | The customer account under which to search for documents. |
| 8 | CusotmerName | "שמוליק טסטים" | The customer name under which to search for documents. |
| 9 | DocType | INT: -1, -2, -3 | Document types to search for: -1 - All regular invoices and receipts (excluding credit documents). -2 - All documents issued. -3 - All credit invoices and credit receipts. Specific document types: 1 - tax invoice/receipt; 2 - credit invoice and refund; 3 - nonprofit receipt / VAT-exempt receipt; 4 - nonprofit credit receipt (refund); 50 - quote; 100 - order (unpaid); 101 - order confirmation from the website (internal document, not for bookkeeping) - paid order; 102 - order credit from the website (internal document, not for bookkeeping) - credited order; 200 - delivery note; 210 - return note; 300 - transaction account; 301 - payment demand; 302 - canceled payment demand; 305 - tax invoice; 330 - credit invoice; 400 - receipt for an invoice; 410 - customer refund (credit receipt); 405 - donation receipt; 406 - credit donation receipt (refund); 303 - receipt account (similar to an invoice for an osek patur, rarely used); 304 - credit receipt account. |
| 10 | CoinId | 1 - shekel 2 - dollar 978 - euro Additional currency codes | Document currency. |
| 11 | OpenClose | INT - 0 / 1 / 2 | Whether to search for open or closed documents: 0 - all document types; 1 - open documents; 2 - closed documents. |
| 12 | VatFreeDocOnly | boolean - true / false | Whether to return only VAT-exempt documents, or both VAT-exempt and VAT-inclusive documents. |
| 13 | PageNumber | 1 | The page from which to retrieve the transaction-list details. |
| 14 | ItemsPerPage | 20 | The number of rows per page from which to retrieve the transaction-list details. |
Query invoice documents response
| No. | Parameter | Example value | Description |
|---|---|---|---|
| 1 | ResponseCode | 0 | Response code. If it equals zero, the function was executed successfully. Any other response indicates that the operation was unsuccessful. |
| 2 | Description | "OK" | Response description. “OK” indicates success. |
Documents values
| No. | Parameter | Example value | Description |
|---|---|---|---|
| 1 | TotalNoVatNIS | 19.00 | Amount excluding VAT, in NIS. |
| 2 | TotalIncludeVATNIS | 22.42 | Total amount including VAT, in NIS. |
| 3 | VATOnlyNIS | 3.42 | VAT amount only, in NIS. |
| 4 | TotalVatFreeNIS | 0.00 | Amount excluding VAT, in NIS. For example, some products may include VAT while others, such as vegetables, do not. |
| 5 | TotalNoVat | 19.00 | Amount excluding VAT. |
| 6 | TotalIncludeVAT | 22.42 | Total amount including VAT. |
| 7 | VATOnly | 3.42 | VAT amount only. |
| 8 | TotalVatFree | 0.00 | Amount excluding VAT. |
| 9 | ISORate | 1.0000 | Value of the document currency in shekels. |
| 10 | Cust_City | "ראשון לציון" | Customer city. |
| 11 | Cust_Addres_Line1 | "רוטשילד" | Customer's first address line. |
| 12 | Cust_Addres_Line2 | "רחוב 12" | Customer's second address line. |
| 13 | Cust_LinePH | "03654118" | Customer's landline telephone number. |
| 14 | Cust_MobilePH | "0533333333" | Customer's mobile telephone number. |
| 15 | Comp_ID | "518648487" | Customer's company number / ID number. |
| 16 | "T@T.COM" | Customer email address. | |
| 17 | Cust_Name | "שמוליק טסטים" | Customer name. |
| 18 | InvoiceDateOnly | "2025-03-24T00:00:00" | Document date only. |
| 19 | InvoiceDate | "2025-03-24T12:16:00" | Document date and the time it was issued. |
| 20 | Invoice_Number | 887 | Document number. |
| 21 | InvoiceType | 1, 2, 3, 4, 50, 100, 101, 102, 200, 210, 300, 301, 302, 303, 304, 305, 330, 400, 405, 406, 410 | Document type. The codes are the same as those listed for DocType above. |
| 22 | Terminal_Number | 1001 | Terminal number. |
| 23 | CoinID | 1 - shekel 2 - dollar Additional currency codes | Document currency. |
| 24 | DepartmentID | 21 | Department number. |
| 25 | IsOpen | boolean - true / false | Whether the document is open, such as a tax invoice without a receipt, or closed, such as a tax invoice/receipt or a credit invoice and refund. |
| 26 | ValueDate | "2025-03-24T00:00:00" | Document value date: the due date, closing date, or payment date. For example, when an invoice is issued, this is the estimated date on which payment will be received. |
| 27 | UserID | 0 | ID of the user who created the document. |
| 28 | Customer_Number | 13167 | Customer number in the Cardcom system. |
| 29 | group_number | null | Custom field in a credit transaction (available only in test environments). |
| 30 | Languge | "HE" / "EN" | Document language. |
| 31 | UserComments | "העמותה נתמכת על ידי סעיף 46" | Document comments. |
| 32 | Discount | INT | Discount amount. |
| 33 | DiscountNIS | INT | Discount amount in NIS. |
| 34 | ValidateItemsisPriceIncludeVat | boolean - true / false | Whether the price includes VAT. |
| 35 | ExternalId | String | External system identifier at the document level only. It is not saved at the customer-account level. |
| 36 | ZReport | 4524 | The Z report number to which the document belongs. |
| 37 | Asmachta | 123456-ZZC | Transaction reference number. |
| 38 | SumBeforeDiscountNIS | 75 | Amount after discount. |
| 39 | TotalChashNIS | 50 | Total cash amount in NIS. |
| 40 | TotalChequesNIS | 60 | Total check amount in NIS. |
| 41 | TotalCreditCardNIS | 70 | Total credit-card amount in NIS. |
| 42 | TotalCustomeTransactionNIS | 180 | Total amount paid using another payment method, in NIS. |
| 43 | TotalRicipientNIS | 360 | Total document amount in NIS. |
| 44 | TotalChash | 25 | Total cash amount. |
| 45 | TotalCheques | 30 | Total check amount. |
| 46 | IsNegetive | boolean - true / false | Whether the amount is negative. |
| 47 | TotalCreditCard | 70 | Total credit-card amount. |
| 48 | TotalCustomeTransaction | 180 | Total amount paid using another payment method. |
| 49 | TotalRicipient | 180 | Total document amount. |
Example request and response
Example request for retrieving document details
{
"ApiName": "test2025",
"ApiPassword": "test5000$",
"FromDateYYYYMMDD": "20250325",
"ToDateYYYYMMDD": "20250325",
"CusotmerName": "סרגיי בורד בן 11",
"DocType": -1,
"PageNumber": 1,
"ItemsPerPage": 50
}Response
The response includes ResponseCode, Description, a Documents array, and the Page and Count values. Each document contains the fields described above. A representative response is shown below:
{
"ResponseCode": 0,
"Description": "Successful operation",
"Documents": [
{
"TotalNoVatNIS": 83.90,
"TotalIncludeVATNIS": 99.00,
"VATOnlyNIS": 15.10,
"TotalVatFreeNIS": 0.00,
"TotalNoVat": 83.90,
"TotalIncludeVAT": 99.00,
"VATOnly": 15.10,
"TotalVatFree": 0.00,
"ISORate": 1.0000,
"Cust_City": "",
"Cust_Addres_Line1": "",
"Cust_Addres_Line2": "",
"Cust_LinePH": "",
"Cust_MobilePH": "0504358886",
"Comp_ID": "",
"Email": "ecw+6446de103e5f9b77e8e40c01@200apps.co",
"Cust_Name": "סרגיי בורד בן 11",
"InvoiceDateOnly": "2025-03-25T00:00:00",
"InvoiceDate": "2025-03-25T06:00:00",
"Invoice_Number": 586364,
"InvoiceType": 1,
"Terminal_Number": 1000,
"CoinID": 1,
"DepartmentID": 0,
"IsOpen": false,
"ValueDate": "2025-03-25T00:00:00",
"UserID": 3622,
"Customer_Number": 0,
"group_number": 0,
"Languge": "HE ",
"UserComments": null,
"Discount": 0.00,
"DiscountNIS": 0.00,
"ValidateItemsisPriceIncludeVat": true,
"ExternalId": null,
"ZReport": null,
"Asmachta": null,
"SumBeforeDiscountNIS": 99.00,
"TotalChashNIS": 0.00,
"TotalChequesNIS": 0.00,
"TotalCreditCardNIS": 99.00,
"TotalCustomeTransactionNIS": 0.00,
"TotalRicipientNIS": 99.00,
"TotalChash": 0.00,
"TotalCheques": 0.00,
"IsNegetive": false,
"TotalCreditCard": 99.00,
"TotalCustomeTransaction": 0.00,
"TotalRicipient": 99.00
}
],
"Page": 1,
"Count": 3
}