Print

eDoreczenia_VerifyEDA

The eDoreczenia_VerifyEDA() function allows to check ability to communicate between the specified e-Delivery electronic addresses (one sender and many receivers) on behalf of the selected mailbox by passing specified verification criteria. The function returns a list of items containing basic information about these addresses:

  • status of the address;
  • type of the address owner (citizen, company, state institution, NGOs, etc.);
  • a correspondence postal address;
  • (sur)name;
  • company name;
  • NIP;
  • KRS;
  • PESEL
  • and many others.

Syntax

eDoreczenia_VerifyEDA(mailboxId, verificationOptions);

Function arguments

  • mailboxId – (String) identifier of the mailbox on behalf of which the query will be sent. The mailbox has to be registered in AMODIT with unique id.
  • verificationOptions – (Object) the set of criteria which allows to define addresses between whom communication should be verified.

Return value

The eDoreczenia_VerifyEDA() function returns Object.
This complex object contains the following properties:

  • Success – returns True, if the operation succeds;
  • CombinedErrorMessage – returns the description of an error in case of the operation failure;
  • SearchStatus – a communication status of EDA (available values: 'Ok’, 'InactiveEDA’, 'NotFound’, 'Error’ and 'MoreItems’);
  • HasWarning – a flag that indicates if warining occured;
  • Warning – a description of a warning.

Examples

Example 1

In this example eDoreczenia_VerifyEDA() function verifies an e-Delivery address (EDA) defined in value from field 'EDA’ on behalf of mailbox with mailbox id fetched from field 'mailboxID’. The result of function execution allows to check a communication status and decides how to handle each case.

verificationOptions.recipientEdas = [EDA];
res = eDoreczenia_VerifyEDA([mailboxId], verificationOptions);
if (!res.Success)
{
  if (res.SearchStatus == 'NotFound')
  {
    ShowMessage(1,'Selected EDA cannot be found. Description: ' +res.CombinedErrorMessage);
  }
  if (res.SearchStatus == 'Error')
  {
    ShowMessage(1,'Error occured. ErrorDescription: ' +res.CombinedErrorMessage);
  }
}
else
{
  if (res.SearchStatus == 'Ok' && !res.HasWarning)
  {
    ShowMessage(1, 'Selected EDA has been found, is valid and accessible. 
      Message can be sent to the specified EDA.');
  }
  if (res.SearchStatus == 'Ok' && res.HasWarning)
  {
    ShowMessage(1, 'Selected EDA has been found, but may be inaccessible due to being forbidden
      (in public e-Delivery service) communication between two non-public EDAs).' + res.Warning);
  }
  if (res.SearchStatus == 'InactiveEDA')
  {
    ShowMessage(1, 'Selected EDA has been found, but is inactive.');
  }
  if (res.SearchStatus == 'MoreItems')
  {
    ShowMessage(1, 'There were more than one EDA found. Try to apply more srtict criteria
      to find the only one EDA.');
  }
}

 

Czy artykuł był pomocny?
0 na 5 gwiazdek
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?