ProvIlyda.SendInvoice Method

Send the invoice to Ilyda provider. 
Provider returns a dictionary(Of String, String) having any results (success or errors).
Public Function SendInvoice( _ 
ByVal inv As invoice, _ 
ByVal ilydaData As ilydaData
) As Dictionary(Of String, String)
This language is not supported or no code example is available.
public Dictionary<string, string> SendInvoice( 
invoice inv
ilydaData ilydaData 
)
This language is not supported or no code example is available.

Parameters

inv
invoice

The myDATA invoice, type of invoice

ilydaData
ilydaData

The provider data, type of ilydaData

Return Value

Dictionary<string, string>

A dictionary(Of String, String) containing provider's answer. 
The Dictionary contains the following values: 

FieldValue / Description
invoiceMarking.invoiceId10cc0a7d9c08fcc0000c1df5eb6d0000
invoiceMarking.providerUrlhttps://test.vs.gr
invoiceMarking.mark400000000000001
invoiceMarking.verificationHash0E654D9E0561063040117E00DD12345678F1D31C
invoiceMarking.invoiceIdentifier89A51000BA594A736E6F4540F32BF000EF9727ED
invoiceMarking.qrCodehttps://test.vs.gr/iv/invoice/download/uhhs_1/uhhs_1~k1~89a51614
invoiceMarking.myDataQrCodehttps://mydataapidev.aade.gr/TimologioQR/QRInfo?q=ijepO4Qcpfosoc
invoiceMarking.aadePreviouslySubmittedError228True/False
invoiceMarking.cancellationMarkIf the delivery note is cancelled, the cancellation mark will be here.
invoiceSignaturesIf there are any POS transactions, the corresponding signatures will be here.
errors[X].codeThe Error Code of the X error
errors[X].defaultMessageThe Error Message of the X error
errors[X].fatalIf the X error is fatal or not (True/False)
errors[X].errorFields[Y].fieldThe Y field of the X error that generated the error
errors[X].errorFields[Y].valueThe Y field value of the X error that generated the error
JSON_ARBDATAVjJ4b2FtUXhUW!RpUlZKU1ZqSjRZVmxYZ^hka1ZrNVlZM!hhWVUxWVFqQlZiVFZQ

Where X and Y are increment numbers starting from zero (0). Example: errors[0].errorFields[0].field

Example
 
  invoice invoice = sni.newInvoice;
 
  #region issuer and counterpart - Fill in only the fields you need.
  	invoice.issuer.vatNumber = "555777001";
  	invoice.issuer.country = "GR";
  	
  	invoice.counterpart.vatNumber = "555777002";
  	invoice.counterpart.country = "GR";
  	#endregion
  	
  #region elements - Fill in only the fields you need.
  	invoice.elements.series = "IZ";
  	invoice.elements.aa = 1;
  	invoice.elements.issueDate = DateTime.Now;
  	invoice.elements.invoiceType = "1.1";
  #endregion
 
  #region Lines - Fill in only the fields you need.
  	invoiceLine ln = sni.newLine;
  	ln.netValue = 200.0d;
  	ln.VatCategory = 1;
  	ln.VatAmount = 48.0d;
  	ln.lineComments = "line comment";
  	ln.classification.Type = "E3_561_001";
  	ln.classification.Category = "category1_1";
  	
  	invoice.lines.Add(ln);
  #endregion
 
  #region payments
  	paymentMethod tmpPay = sni.newPaymentMethod;
  	tmpPay.@type = 1;
  	tmpPay.amount = 496.0d;
  	invoice.payments.Add(tmpPay);
  #endregion
 
  #region Ilyda Data
  	var ily = default(ilydaData);
  	ily.extraDetails.issuerName = "George M.";
  	ily.extraDetails.issuerAddress = "New Street 111";
  	ily.extraDetails.issuerPostalCode = "12345";
  	ily.extraDetails.issuerCity = "Thessaloniki";
  	ily.extraDetails.issuerEmail = "issuer@myemail.com";
  	ily.extraDetails.issuerPhone = "00302101111111";
  	ily.extraDetails.issuerJob = "Retail Services";
      ily.extraDetails.issuerTaxOffice = "A' Athinon";
      ily.extraDetails.issuerGemh = "11111111111111111";
  	
  	ily.extraDetails.counterpartName = "Papadopoulos G.";
  	ily.extraDetails.counterpartAddress = "New street 57";
  	ily.extraDetails.counterpartPostalCode = "12345";
  	ily.extraDetails.counterpartCity = "Athens";
  	ily.extraDetails.counterpartEmail = "counterpart@myemail.gr";
  	ily.extraDetails.counterpartPhone = "00302101111111";
  	ily.extraDetails.counterpartCode = "1000001";
      ily.extraDetails.counterpartJob = "Online Services and Software";
      ily.extraDetails.counterpartTaxOffice = "A' Athinon";
  	
      ily.extraDetails.invoiceNotes = "";
  	ily.extraDetails.paymentTerms = "POS Payment";
  	ily.extraDetails.paymentTerminalID = "1234567890";
  	ily.extraDetails.contractReference = "24SSSS111111111";
  	ily.extraDetails.projectReference = "3|1234567";
  	
  	var pLines = new List<provLine>();
  	var pline = new provLine();
  	pline.discountPercentage = 0.0d;
  	pline.discountAmount = 0.0d;
  	pline.itemName = "TEST PRODUCT";
  	pline.itemCode = "123";
  	pline.countryOfOrigin = "US";
  	pline.peppolTaxCategory = "S";
  	pline.peppolMeasurementUnit = "XUN";
  	pline.itemMeasurmentUnit = "BOX";
  	
  	var pItems = new List<peppolItemClass>();
  	var pItem = default(peppolItemClass);
  	pItem.itemID = "03100000-2";
  	pItem.itemClass = "STI";
  	pItems.Add(pItem);
  	pline.itemClass = pItems;
  	
  	pLines.Add(pline);
  	ily.invoiceLines = pLines;
  #endregion
 
  var il = new ProvIlyda("ilydaUser", "ilydaPassword", "arbUser", "arbKey", false);
  Dictionary<string, string> fResult = il.SendInvoice(invoice, ily);					
This language is not supported or no code example is available.
  Dim invoice As invoice = sni.newInvoice
 
  #Region "issuer and counterpart - Fill in only the fields you need."
          invoice.issuer.vatNumber = "555777001"
          invoice.issuer.country = "GR"
 
          invoice.counterpart.vatNumber = "555777002"
          invoice.counterpart.country = "GR"
  #End Region
 
  #Region "elements - Fill in only the fields you need."
          invoice.elements.series = "IZ"
          invoice.elements.aa = 1
          invoice.elements.issueDate = Date.Now
          invoice.elements.invoiceType = "1.1"
  #End Region
 
  #Region "Lines - Fill in only the fields you need."
          Dim ln As invoiceLine = sni.newLine
          ln.netValue = 200.0
          ln.VatCategory = 1
          ln.VatAmount = 48.0
          ln.lineComments = "line comment"
          ln.classification.Type = "E3_561_001"
          ln.classification.Category = "category1_1"
 
          invoice.lines.Add(ln)
  #End Region
 
  #Region "payments"
          Dim tmpPay As paymentMethod = sni.newPaymentMethod
          tmpPay.type = 1
          tmpPay.amount = 496.0
          invoice.payments.Add(tmpPay)
  #End Region
 
  #Region "Ilyda Data"
      Dim ily As ilydaData
      ily.extraDetails.issuerName = "George M."
      ily.extraDetails.issuerAddress = "New Street 111"
      ily.extraDetails.issuerPostalCode = "12345"
      ily.extraDetails.issuerCity = "Thessaloniki"
      ily.extraDetails.issuerEmail = "issuer@myemail.com"
      ily.extraDetails.issuerPhone = "00302101111111"
      ily.extraDetails.issuerJob = "Retail Services"
      ily.extraDetails.issuerTaxOffice = "A' Athinon"
      ily.extraDetails.issuerGemh = "11111111111111111"
 
      ily.extraDetails.counterpartName = "Papadopoulos G."
      ily.extraDetails.counterpartAddress = "New street 57"
      ily.extraDetails.counterpartPostalCode = "12345"
      ily.extraDetails.counterpartCity = "Athens"
      ily.extraDetails.counterpartEmail = "counterpart@myemail.gr"
      ily.extraDetails.counterpartPhone = "00302101111111"
      ily.extraDetails.counterpartCode = "1000001"
      ily.extraDetails.counterpartJob = "Online Services and Software"
      ily.extraDetails.counterpartTaxOffice = "A' Athinon"
 
      ily.extraDetails.invoiceNotes = ""
      ily.extraDetails.paymentTerms = "POS Payment"
      ily.extraDetails.paymentTerminalID = "1234567890"
      ily.extraDetails.contractReference = "24SSSS111111111"
      ily.extraDetails.projectReference = "3|1234567"
 
      Dim pLines As New List(Of provLine)
      Dim pline As New provLine
      pline.discountPercentage = 0.0
      pline.discountAmount = 0.0
      pline.itemName = "TEST PRODUCT"
      pline.itemCode = "123"
      pline.countryOfOrigin = "US"
      pline.peppolTaxCategory = "S"
      pline.peppolMeasurementUnit = "XUN"
      pline.itemMeasurmentUnit = "BOX"
 
      Dim pItems As New List(Of peppolItemClass)
      Dim pItem As peppolItemClass
      pItem.itemID = "03100000-2"
      pItem.itemClass = "STI"
      pItems.Add(pItem)
      pline.itemClass = pItems
 
      pLines.Add(pline)
      ily.invoiceLines = pLines
  #End Region
 
  Dim il As ProvIlyda = New ProvIlyda("ilydaUser", "ilydaPassword", "arbUser", "arbKey", False)
  Dim fResult As Dictionary(Of String, String) = il.SendInvoice(invoice, ily)
  					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition