Knowledge Base / API
עברית

Ask AI

✦ AI answer

Thinking…

Sources

    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

    Query invoice documents

    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.ParameterExample valuesDescription
    1ApiName"test2025"Interface username. This parameter must be obtained from the business.
    2ApiPassword"kzFKfohEvL6AOF8aMEJz"API password, intended for crediting and canceling transactions.
    3FromDate"2025/03/23"Date from which to begin searching for documents.
    4ToDate"2025/03/25"Date through which to search for documents.
    5FromDateYYYYMMDD"20250324"Date from which to begin searching for documents.
    6ToDateYYYYMMDD"20250325"Date through which to search for documents.
    7AccountId6549The customer account under which to search for documents.
    8CusotmerName"שמוליק טסטים"The customer name under which to search for documents.
    9DocTypeINT: -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.

    10CoinId1 - shekel
    2 - dollar
    978 - euro
    Additional currency codes
    Document currency.
    11OpenCloseINT - 0 / 1 / 2

    Whether to search for open or closed documents:

    0 - all document types; 1 - open documents; 2 - closed documents.

    12VatFreeDocOnlyboolean - true / falseWhether to return only VAT-exempt documents, or both VAT-exempt and VAT-inclusive documents.
    13PageNumber1The page from which to retrieve the transaction-list details.
    14ItemsPerPage20The number of rows per page from which to retrieve the transaction-list details.

    Query invoice documents response

    No.ParameterExample valueDescription
    1ResponseCode0Response code. If it equals zero, the function was executed successfully. Any other response indicates that the operation was unsuccessful.
    2Description"OK"Response description. “OK” indicates success.

    Documents values

    No.ParameterExample valueDescription
    1TotalNoVatNIS19.00Amount excluding VAT, in NIS.
    2TotalIncludeVATNIS22.42Total amount including VAT, in NIS.
    3VATOnlyNIS3.42VAT amount only, in NIS.
    4TotalVatFreeNIS0.00Amount excluding VAT, in NIS. For example, some products may include VAT while others, such as vegetables, do not.
    5TotalNoVat19.00Amount excluding VAT.
    6TotalIncludeVAT22.42Total amount including VAT.
    7VATOnly3.42VAT amount only.
    8TotalVatFree0.00Amount excluding VAT.
    9ISORate1.0000Value of the document currency in shekels.
    10Cust_City"ראשון לציון"Customer city.
    11Cust_Addres_Line1"רוטשילד"Customer's first address line.
    12Cust_Addres_Line2"רחוב 12"Customer's second address line.
    13Cust_LinePH"03654118"Customer's landline telephone number.
    14Cust_MobilePH"0533333333"Customer's mobile telephone number.
    15Comp_ID"518648487"Customer's company number / ID number.
    16Email"T@T.COM"Customer email address.
    17Cust_Name"שמוליק טסטים"Customer name.
    18InvoiceDateOnly"2025-03-24T00:00:00"Document date only.
    19InvoiceDate"2025-03-24T12:16:00"Document date and the time it was issued.
    20Invoice_Number887Document number.
    21InvoiceType1, 2, 3, 4, 50, 100, 101, 102, 200, 210, 300, 301, 302, 303, 304, 305, 330, 400, 405, 406, 410Document type. The codes are the same as those listed for DocType above.
    22Terminal_Number1001Terminal number.
    23CoinID1 - shekel
    2 - dollar
    Additional currency codes
    Document currency.
    24DepartmentID21Department number.
    25IsOpenboolean - true / falseWhether 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.
    26ValueDate"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.
    27UserID0ID of the user who created the document.
    28Customer_Number13167Customer number in the Cardcom system.
    29group_numbernullCustom field in a credit transaction (available only in test environments).
    30Languge"HE" / "EN"Document language.
    31UserComments"העמותה נתמכת על ידי סעיף 46"Document comments.
    32DiscountINTDiscount amount.
    33DiscountNISINTDiscount amount in NIS.
    34ValidateItemsisPriceIncludeVatboolean - true / falseWhether the price includes VAT.
    35ExternalIdStringExternal system identifier at the document level only. It is not saved at the customer-account level.
    36ZReport4524The Z report number to which the document belongs.
    37Asmachta123456-ZZCTransaction reference number.
    38SumBeforeDiscountNIS75Amount after discount.
    39TotalChashNIS50Total cash amount in NIS.
    40TotalChequesNIS60Total check amount in NIS.
    41TotalCreditCardNIS70Total credit-card amount in NIS.
    42TotalCustomeTransactionNIS180Total amount paid using another payment method, in NIS.
    43TotalRicipientNIS360Total document amount in NIS.
    44TotalChash25Total cash amount.
    45TotalCheques30Total check amount.
    46IsNegetiveboolean - true / falseWhether the amount is negative.
    47TotalCreditCard70Total credit-card amount.
    48TotalCustomeTransaction180Total amount paid using another payment method.
    49TotalRicipient180Total 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
    }

    Was this article helpful?