Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This operation allows to submit an EviMail message with the following data:

...

This operation allows to submit an EviMail message with the following data:

NOTE 1.- All information about EviNotice in this help is deprecated. To issue and EviNotice you can use API v2 - EviNoticeSubmit (API V2


  • LookupKey [optional]: Identifier allocated by the user. It can be used later to locate evidence through the query web service (Query).
  • Body: Subject of the message to be sent.
  • IssuerName: Name or corporate name of message issuer (por example, The name and Fiscal Identity Number (NIF) of the issuer company).
  • From [Optional] :E-mail address with which the FROM of the EviMail e-mail will be configured. The submit will validate that the address is configured in the sending user's account and that the domain is verified. 
    • Example: "From": "custom from <custom-from@mydomain.com>".
  • DisableSenderOnNotifications(boolean) [Optional] : Disables the display of the Sender in notification emails. It has FALSE value by default; in case of being informed with TRUE value, the display of the Sender in the notification emails will be disabled. It can only be used in case the FROM is being modified.

    Note: Disabling this option may affect the traceability of the EviMail, as this sender is used to make status updates by means of the replies made by the recipient's mail server.

  • Recipient: Data about the message’s recipient:
    • LegalName [optional]: Name or corporate name of the recipient of the email (for example, The name and Fiscal Identity Number (NIF) of the recipient company).
    • EmailAddress: E-mail address of the recipient of the message.
  • CarbonCopy: Data relating to the recipient of the copy of the message:
    • Name [optional]: Name or company name of the recipient of the copy of the message (e.g. the name and VAT number of the recipient company).
    • EmailAddress: E-mail address of the recipient of the copy of the message.
  • Options: Sending/processing options of the message:
    • CostCentre [optional]: In terms of invoicing, it allows to group sendings. In order to automate invoicing and to allocate expense.

...

In the case of JSON it should be reported as follows: "PushNotificationFilter":["STRING"]

    • AffidavitKinds: [optional]: List of Affidavit kinds. It specifies which Affidavits will be generated during the process. This parameter is important for invoicing purposes. Values to be displayed are as follows:
      • Submitted: An Affidavit will be generated when the message has been processed locally, its contents certified and ready for further transmission.
      • SubmittedAdvanced: An Affidavit will be generated when the message was processed locally, its contents certified and included in the Affidavit, ready for further transmission.
      • TransmissionResult: An Affidavit will be generated when:
        • The system successfully sent the message to the server of the organisation managing the recipient's mailbox.
        • The system could not credit the sending of the message to the server of the organisation managing the recipient's mailbox.
      • DeliveryResult: An Affidavit will be generated when:
        • The system received confirmation of the delivery of the message.
        • The system received confirmation that the message was undeliverable.
      • Read: An Affidavit will be generated when the system confirmed the opening/reading of the message.
      • Committed: An Affidavit will be generated when:
        • The recipient made a formal statement accepting the message and its contents.
        • The recipient made a formal statement rejecting the message and its contents.
      • CommittedAdvanced: An Affidavit will be generated when:
        • The recipient made a formal statement accepting the message and its contents. The content will be included in the Affidavit.
        • The recipient made a formal statement rejecting the message and its contents. The content will be included in the Affidavit.
      • Closed: An Affidavit will be generated when the system terminated the processing of the message when the tracking expiry date was reached.
      • ClosedAdvanced: An Affidavit will be generated when the system terminated the processing of the message when the tracking expiry date was reached. The content will be included in the Affidavit.
      • Complete: An Affidavit will be generated when the system terminated the processing of the message when the tracking expiry date was reached and generated a tracking summary.
      • CompleteAdvanced: An Affidavit will be generated when the system terminated the processing of the message when the tracking expiry date was reached and generated a tracking summary. The content will be included in the Affidavit.
      • OnDemand: An Affidavit will be generated when the system issued a new affidavit (on demand) at the request of the issuer with the information collected so far.
      • Event: An Affidavit will be generated when the system received an event considered relevant that does not have a specific Kind of affidavit.
      • Failed: An Affidavit will be generated when the system received a finalising error that makes it impossible to continue processing the file.
    • CustomLayoutLogoUrl [optional]: Allows to set a custom logo URL. This logo will be used to replace the existing logo during the delivery process.

  • PushNotificationExtraData: Text field in which the issuer of the contract may indicate additional data. These data will be sent later in each push notification that is made.
  • Attachments[optional]: List of message attachments:
    • DisplayName: Name of the attachment.
    • FileName: Name of the file.
    • Data: Content (bytes) of the file to be attached.
    • MimeType[optional]: Information on mime type of attachment.
    • ContentId[optional]: Mime identifier of the attachment.
    • ContentDescription[optional]: Mime description of the attachment.
    • Attributes: Attributes that you want to indicate about the attachment [optional].
      • Attribute: This property will contain as many Attribute nodes as necessary and within them different key-values will be assigned.
        • Key: Name of the key.
        • Value: Value for the previous key.
      • The following are the key-values that can be used in this node:
        • Key = IncludeOnAffidavits, Value = true, indicates that the annex will be included in the affidavits.
        • An example of an attachment node with an attributes node is shown below.

          Code Block
          [
          	{
          		"UniqueId":"00000000-0000-0000-0000-000000000000",
          		"CreationDate":"0001-01-01T00:00:00",
          		"EvidenceUniqueId":"00000000-0000-0000-0000-000000000000",
          		"DisplayName":"4kb.pdf",
          		"Filename":"4kb.pdf",
          		"Data":"[ATTENTION: here would be the BASE64 of the attachment in PDF format.]",
          		"Attributes": [
          			{
          				"Key":"IncludeOnAffidavits",
          				"Value":true
          			}
          		]
          	}
          ] 


...

Code Block
titleExample of request in JSON
POST https://app.evicertia.com/api/EviMail/Submit HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX==
Host: app.evicertia.com

{
	"LookupKey":"EviMail",
	"Subject":"WS test",
	"Body":"Hola",
	"IssuerName":"ElJuanGAllego",
	"Recipient":
	{
		"LegalName":"JGM",
		"EmailAddress":"juan@gallegomolero.es"
	},
	"CarbonCopy": [
 		{
            "name": "PGG",
            "emailAddress": "pablo@garcia.com" 
        },
 		{
            "name": "JLL",
            "emailAddress": "joseluis@lozano.com" 
   		}
    ],  
	"Attachments":
	[
		{
			"UniqueId": "00000000-0000-0000-0000-000000000000",
			"CreationDate": "0001-01-01T00:00:00",
			"EvidenceUniqueId": "00000000-0000-0000-0000-000000000000",
			"DisplayName": "4kb.pdf",
			"Filename": "4kb.pdf",
			"Data": "[ATENTTION: BASE64 for PDF file would appear here]"
		}
	],
	"Options": {}
}



In case of successful sending, the identifier allocated to the evidence (eviId) that can be used later to consult its state is returned.


Example of answer in JSON



{
	"eviId": "87ffa214e7734bd59b8da8ef00fd80f8"
}













Idempotence Activation

There is the option to activate the idempotency capability to avoid sending the same EviMail more than once in case of repeated submitting. For that, a request with the name "X-Evi-IdempotencyToken", must be added to the request headers, adding as a value some random text (the use of a GUID is recommended).

Examples and further information about parameters

More information is given below and examples of the parameters are given, so that they are understood more easily. This section is organized in alphabetical order.

Push notifications

This method allows to report changes in the state of an evidence, without the need to periodically check its status.









Every time an evidence changes its state, the user will be notified through a POST to the url shown as a parameter of the request.









Please find here below the common information returned for any push notification for an EviMail/EviNotice (Deprecated):

  • Identifier: Identifier of the event.
  • Kind:  Mnemonic of the notification received.
  • Date: Date of event.
  • EvidenceId: Identifier of evidence.
  • EvidenceType: Type of evidence.
  • Site: Name of user’s site.
  • Owner: Name of site’s user.
  • OwnerEmail: Email of site’s user.
  • AdditionalData: Additional information in the form of a key-value:
    • From: Issuer’s email adress.
    • To: Recipient’s email address..
    • Subject: Subject indicated by the issuer.
    • LookupKey: Identifier allocated by the user, it can be used later to locate evidence through the query web service (Query).
    • State: Name of the evidence state.
    • CreationDate: Creation date.






In addition, depending on the type of event, specific properties will be added in AdditionalData:

  • Sent:
    • XmissionDetails: Technical detail of delivery process.
  • Dispatched / Delivered / Read:
    • Progress: Title of the progress.
    • Description: Detailed description of the progress.
  • Replied:
    • Kind: Action carried out by the signatory user.
    • Comments: Comments made by the signatory user.
  • Closed:
    • Outcome: Result of processing.






In the case where additional data is indicated in the PushNotificationExtraData parameter, it will be added in a property called ExtraData inside AdditionalData


Code Block
titleExample of a push notification answer (SENT):
{
	"Identifier": "1234",
	"EvidenceId": "2aca3ea149f943879726a87000c1f704",
	"EvidenceType": "eviMail",
	"Kind": "Sent",
	"Date": "2018-01-22T12:46:32.4830752+01:00",
	"Site": "pruebas",
	"Owner": "Pruebas evicertia",
	"OwnerEmail": "pruebas@evicertia.com",
	"AdditionalData": {
		"From": "pruebas@evicertia.com",
		"To": "pruebas-receptor@evicertia.com",
		"Subject": "Prueba notificación push...",
		"LookupKey": "prueba-notificacion-push",
		"State": "Enviado",
		"CreationDate": "2018-01-22T12:46:12.3113880+01:00",
		"XmissionDetails": "* Processing emails for domain evicertia.com.\n* Resolving Mail Exchaner (MX) DNS...",
		"ExtraData": "{\"myId\": \"99cf386b-1590-4ddb-af68-607b3e7c1194\", \"myCreationDate\": \"2018-01-22T12:54:00.4367924+01:00\"}
	}
}


...