RequestInvoices.Request Method

Request - Get all invoices sent to the entity or the invoices sent by the entity.
Public Sub Request( _ 
ByVal initialMark As String, _ 
ByVal maxPages As Integer, _ 
ByVal method As Integer, _ 
Optional ByVal SearchParam As String() = Nothing, _ 
Optional ByVal GreekErrors As Boolean = False _ 
)
This language is not supported or no code example is available.
public void Request( 
string initialMark
int maxPages
int method
string[] SearchParam = Nothing, 
bool GreekErrors = False 
)
This language is not supported or no code example is available.

Parameters

initialMark
string

Initial Search Mark. Example 400001827650000 
Note: If you want to retrieve All the invoices, start with MARK zero (0).

maxPages
int

Maximum myDATA pages to retrieve. Note: myDATA returns no more than 1000 invoices per page. You can only retrieve five (5) pages at a time!

method
int

The type of Invoices you want to retrieve. 
method=1 --> TransmittedDocs 
method=2 --> RequestDocs

SearchParam
string[]

Search Parameters, string array. 
<param name="GreekErrors">Determines if the error will be returned in Greek or not.</param> The values that this field can take are as follows: {dateFrom, dateTo, entityVatNumber, counterVatNumber, invType, maxMark} 
Every date field is formatted as dd/MM/yyyy.

GreekErrors
bool

Example
 
  // This code will retrieve all the income invoices for the first semester of the year 2022.
  RequestInvoices rqd = new RequestInvoices("AADEUserID", "OcpApimSubscriptionKey", "ExecuteEntityVatNumber", "Arbitrans User", "Arbitrans Key", false);
 
  //SearchParam = {dateFrom, dateTo, entityVatNumber, counterVatNumber, invType, maxMark};
  string[] SearchParam = {"01/01/2022", "31/03/2022", "", "", "", ""};
 
  rqd.Request(0, 4, 1, SearchParam); //Retrieve 4 pages at once, starting with MARK 0 and in a range of dates from 01/01/2022 to 31/03/2022.
 
  if (IsNothing(rqd.getErrorMessage))
     DataTable dt = rqd.getInvoices();
     // Diplay DataTable code here
  else
     MessageBox.Show(rqd.getErrorMessage);
  					
This language is not supported or no code example is available.
  ' This code will retrieve all the income invoices for the first semester of the year 2022.
  Dim rqd As RequestInvoices = New RequestInvoices("AADEUserID", "OcpApimSubscriptionKey", "ExecuteEntityVatNumber", "Arbitrans User", "Arbitrans Key", False)
 
  'SearchParam = {dateFrom, dateTo, entityVatNumber, counterVatNumber, invType, maxMark}
  Dim SearchParam as String() = {"01/01/2022", "31/03/2022", "", "", "", ""}
 
  rqd.Request(0, 4, 1, SearchParam) 'Retrieve 4 pages at once, starting with MARK 0 and in a range of dates from 01/01/2022 to 31/03/2022.
 
  If IsNothing(rqd.getErrorMessage) Then
      Dim dt As DataTable = rqd.getInvoices()
      ' Diplay DataTable code here
  Else
      MessageBox.Show(rqd.getErrorMessage)
 End If
  					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition