SearchInvoices
Description
The SearchInvoices method retrieves Invoice objects from the EBizCharge platform. If no IDs or filters are provided, all Invoice objects are returned.
Syntax
Invoice[] SearchInvoices(SecurityToken securityToken, string customerId, string subCustomerId, string invoiceNumber, string invoiceInternalId, SearchFilter[] filters, int start, int limit, string sort, bool includeItems)
Arguments
| Type | Name | Req. | Description |
|---|---|---|---|
| SecurityToken | securityToken | R | A unique token that is used to identify a merchant and authenticate the API request. |
| string | customerId | D | Filters invoices by Customer. Note: Required if invoiceNumber is sent and subCustomerId is not sent. |
| string | subCustomerId | D | Filters invoices by SubCustomer. Note: Required if invoiceNumber is sent and customerId is not sent. |
| string | invoiceNumber | O | Filters by invoice number. |
| string | invoiceInternalId | O | Filters invoices by the internal Id. |
| SearchFilter | filters | O | Filters Invoice objects based on one or more field names, comparison operators, and field values. See supported search parameters below. |
| int | start | R | Index of the first object to return in the array. Note: Must be ≥ 0. |
| int | limit | R | Maximum number of objects to return. Note: Must be > 0. |
| string | sort | O | Sorts by field name.Supported Sort Parameters
|
| boolean | includeItems | R | Whether to include the Item object from the retrieved Invoice. |
Return Value
Supported Search Parameters
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>CustomerId</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>CBS</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>SubCustomerId</td>
<td>Filters by the ID of the sub-customer.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>SubCustomerId</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>2</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceNumber</td>
<td>Filters by the invoice number.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceNumber</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>Inv1-011</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceInternalId</td>
<td>Filters by the internal ID of the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceInternalId</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>****123-3453***</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceDate</td>
<td>Filters by the date the invoice was created.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceDate</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>2017-01-01</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>Currency</td>
<td>Filters by the currency code.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>Currency</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>USD</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceAmount</td>
<td>Filters by the total amount on the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceAmount</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>10.0000</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceDueDate</td>
<td>Filters by the the date the invoice is due.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceDueDate</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>2024-04-02</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>AmountDue</td>
<td>Filters by the amount due on the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>AmountDue</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>5.0000</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>PoNum</td>
<td>Filters by purchase order number.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>Currency</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>PO100</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>SoNum</td>
<td>Filters by sales order number.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>SoNum</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>SO100</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>DivisonID</td>
<td>Filters by the divison ID.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>DivisonID</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>100</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>DateUploaded</td>
<td>Filters by the date the invoice was uploaded.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>DateUploaded</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>2025-11-11T00:48:50</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>Software</td>
<td>Filters by the integration associated to the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>Software</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>QuickBooks</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceURL</td>
<td>Filters by the URL of the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceURL</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>https://www.invoice.pdf</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>TotalTaxAmount</td>
<td>Filters by the total tax amount on the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>TotalTaxAmount</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>10.0000</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceUniqueId</td>
<td>Filters by the unique ID of the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceUniqueId</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>0-123-456</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceIsToBeEmailed</td>
<td>Filters by whether the invoice is to be emailed.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceIsToBeEmailed</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>true</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceIsToBePrinted</td>
<td>Filters by whether the invoice is to be printed.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceIsToBePrinted</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>true</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceClass</td>
<td>Filters by the class of the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceClass</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>test</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
<tr>
<td>InvoiceFOB</td>
<td>Filters by the FOB of the invoice.</td>
<td>
<pre>
<code>
`<ebiz:SearchFilter>`
` <ebiz:FieldName>InvoiceFOB</ebiz:FieldName>`
` <ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>`
` <ebiz:FieldValue>12</ebiz:FieldValue>`
`</ebiz:SearchFilter>`
</code>
</pre>
</td>
</tr>
Example Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header/>
<soapenv:Body>
<ebiz:SearchInvoices>
<ebiz:securityTokenCustomer>
<ebiz:SecurityId>*********bf0-91cd-95ccdc**********</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityTokenCustomer>
<ebiz:customerId/>
<ebiz:subCustomerId/>
<ebiz:invoiceNumber/>
<ebiz:invoiceInternalId/>
<ebiz:filters>
<!--Zero or more repetitions:-->
<ebiz:SearchFilter>
<ebiz:FieldName>CustomerId</ebiz:FieldName>
<ebiz:ComparisonOperator>eq</ebiz:ComparisonOperator>
<ebiz:FieldValue>CBS</ebiz:FieldValue>
</ebiz:SearchFilter>
</ebiz:filters>
<ebiz:start>1</ebiz:start>
<ebiz:limit>2</ebiz:limit>
<ebiz:sort/>
<ebiz:includeItems>false</ebiz:includeItems>
</ebiz:SearchInvoices>
</soapenv:Body>
</soapenv:Envelope>var client = new eConnect.IeBizServiceClient();
eConnect.SecurityToken securityToken = new eConnect.SecurityToken();
securityToken.UserId = "";
securityToken.SecurityId = "********-90b4-4a38-ad78-********";
securityToken.Password = "";
var filters = new eConnect.SearchFilter[3];
filters[0] = new eConnect.SearchFilter();
filters[1] = new eConnect.SearchFilter();
filters[2] = new eConnect.SearchFilter();
filters[0].FieldName = "InvoiceDueDate";
filters[0].ComparisonOperator = "ge";
filters[0].FieldValue = "2015-11-25";
filters[1].FieldName = "InvoiceDueDate";
filters[1].ComparisonOperator = "le";
filters[1].FieldValue = "2017-11-26";
filters[2].FieldName = "InvoiceAmount";
filters[2].ComparisonOperator = "ge";
filters[2].FieldValue = "1000.00";
eConnect.Invoice[] inv = client.SearchInvoices(securityToken, "", "", "", "", filters, 1, 3, "", false);
for (int i = 0; i < inv.Count(); i++)
{
Console.WriteLine(i.ToString() + " CustomerId: " + inv[i].CustomerId.ToString() );
Console.WriteLine(i.ToString() + " SubCustomerId: " + inv[i].SubCustomerId.ToString());
Console.WriteLine(i.ToString() + " InvoiceNumber: " + inv[i].InvoiceNumber.ToString());
Console.WriteLine(i.ToString() + " InvoiceInternalId: " + inv[i].InvoiceInternalId.ToString());
Console.WriteLine(i.ToString() + " InvoiceDate: " + inv[i].InvoiceDate.ToString());
Console.WriteLine(i.ToString() + " InvoiceAmount: " + inv[i].InvoiceAmount.ToString());
Console.WriteLine(i.ToString() + " InvoiceDueDate: " + inv[i].InvoiceDueDate.ToString());
Console.WriteLine(i.ToString() + " AmountDue: " + inv[i].AmountDue.ToString());
Console.WriteLine(i.ToString() + " TotalTaxAmount: " + inv[i].TotalTaxAmount.ToString());
Console.WriteLine(i.ToString() + " Software: " + inv[i].Software.ToString());
Console.WriteLine(i.ToString() + " InvoiceUniqueId: " + inv[i].InvoiceUniqueId.ToString());
}function searchInvoices()
{
$client = new SoapClient('End point URL');
$securityToken = array(
'SecurityId' => '********-454757-********-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$searchFilters['SearchFilter'][0] = array(
'FieldName' => 'InvoiceDueDate',
'ComparisonOperator' => 'ge',
'FieldValue' => '2021-01-25'
);
$searchInvoices = $client->SearchInvoices(array(
'securityToken' => $securityToken,
'customerId' => '123',
'invoiceNumber' => '00102566',
'filters' => $searchFilters,
'start' => 0,
'limit' => 10,
));
$invoices = $searchInvoices->SearchInvoicesResult;
}Example Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SearchInvoicesResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<SearchInvoicesResult>
<Invoice>
<CustomerId>CBS</CustomerId>
<SubCustomerId></SubCustomerId>
<InvoiceNumber>Inv1-103</InvoiceNumber>
<InvoiceInternalId>********-1442-4645-8f89-********</InvoiceInternalId>
<InvoiceDate>2017-01-01</InvoiceDate>
<Currency>USD</Currency>
<InvoiceAmount>1000.0000</InvoiceAmount>
<InvoiceDueDate>2016-04-02</InvoiceDueDate>
<AmountDue>5.0000</AmountDue>
<PoNum>PO001</PoNum>
<SoNum>SO001</SoNum>
<DivisionId>0001</DivisionId>
<Software>QuickBooks</Software>
<NotifyCustomer>false</NotifyCustomer>
<InvoiceURL>https://www.ebizcharge.net/uploads/invoice001.pdf</InvoiceURL>
<TotalTaxAmount>10.0000</TotalTaxAmount>
<InvoiceUniqueId>x123-456-123</InvoiceUniqueId>
</Invoice>
<Invoice>
<CustomerId>CBS</CustomerId>
<SubCustomerId></SubCustomerId>
<InvoiceNumber>Inv1-6666</InvoiceNumber>
<InvoiceInternalId>********-4c91-493b-b5c5-********</InvoiceInternalId>
<InvoiceDate>2017-01-01</InvoiceDate>
<Currency>USD</Currency>
<InvoiceAmount>1000.0000</InvoiceAmount>
<InvoiceDueDate>2016-04-02</InvoiceDueDate>
<AmountDue>52.2500</AmountDue>
<PoNum>PO001</PoNum>
<SoNum>SO001</SoNum>
<DivisionId>0001</DivisionId>
<Software>QuickBooks</Software>
<NotifyCustomer>false</NotifyCustomer>
<InvoiceURL>https://www.ebizcharge.net/uploads/invoice001.pdf</InvoiceURL>
<TotalTaxAmount>10.0000</TotalTaxAmount>
<InvoiceUniqueId>x123-456-123</InvoiceUniqueId>
</Invoice>
</SearchInvoicesResult>
</SearchInvoicesResponse>
</s:Body>
</s:Envelope><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SearchInvoicesResponse xmlns="http://eBizCharge.ServiceModel.SOAP"/>
</s:Body>
</s:Envelope>Updated 7 months ago
