PATH v2/EviNotice/Batches
HTTP Method: PATH
Description:
This endpoint allows the creation of a request for a bulk email in EviNotice. Upon receiving the initial data for the bulk email/SMS request, the system returns a BatchId
that identifies the request. This BatchId
will be used in other endpoints to specify recipients, attachments, and finalize the configuration before processing the sending.
Input Parameters
Description (string): Description of the bulk email/SMS.
Subject (string): It is the subject that accompanies the notification and the message.
IssuerName (string): Name of the sender for the bulk email/SMS.
CostCentre (string, optional): Cost center for billing grouping.
AffidavitKinds (IEnumerable<AffidavitKind>, optional): List of affidavit types to be generated.
Language (string, optional): Language for the email/SMS.
AffidavitLanguage (string, optional): Language for the generated affidavits.
OnlineRetentionPeriod (int, optional): Years of online custody for the evidence.
LtaStorage (bool, optional): Indicates if the evidence will be stored in LTA storage.
PushNotificationUrl (string, optional): URL to receive status change notifications of the evidence.
PushNotificationFilter (PushNotificationsFilterCollection, optional): List of push notifications expected by the client.
PushNotificationExtraData (string, optional): Additional data that the sender wishes to include in each push notification.
CommitmentOptions (EviNoticeCommitmentOptionsMode, optional): Allows configuration of whether the recipient can accept/reject the message.
Disabled
Accept:
Reject:
AcceptOrReject:
CommitmentCommentsAllowed (bool, optional): Allows the recipient to add comments upon accepting/rejecting.
RejectReasons (IEnumerable<string>, optional): Specifies a list of possible reasons for rejecting the message.
AcceptReasons (IEnumerable<string>, optional): Specifies a list of possible reasons for accepting the message.
RequireRejectReason (bool, optional): Requires specifying a reason for rejection.
RequireAcceptReason (bool, optional): Requires specifying a reason for acceptance.
BatchPushNotificationUrl (string, optional): URL to receive notifications once the process is complete.
AllowRefusal (bool,optional): Allows the addressee to refuse to read the notification before identifying himself/herself.
ScheduledDate (datetime, optional)
Specifies the date and time the batch should be sent.
Note:
This parameter is incompatible with the
State
parameter, as they serve opposite purposes.This parameter is used to finalize the configuration of a batch and set its shipping date.
State (string, optional)
Used to revert a previously scheduled batch back to the "DRAFT" state or to finalize a batch using “Submitted”
Valid Value:
"Draft", "Submitted"
.Note:
This parameter is used to finalize the configuration of a batch and set its shipping date.
Output Parameters
No output parameters.
The endpoint will only return an HTTP status code indicating the result of the operation.
Request Example
PATCH /v2/EviNotice/Batches/01934531-4851-4ea8-8113-df6438722d
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"Description": "Bulk invitation mailing",
"IssuerName": "Marketing Team",
"CostCentre": "Marketing",
"AffidavitKinds": ["Delivery"],
"Language": "en",
"AffidavitLanguage": "en",
"OnlineRetentionPeriod": 1,
"LtaStorage": false,
"PushNotificationUrl": "https://client.callback.url/notifications",
"PushNotificationFilter": ["Delivered", "Submitted"],
"PushNotificationExtraData": "Spring Campaign",
"CommitmentOptions": "AcceptOrReject",
"CommitmentCommentsAllowed": true,
"RejectReasons": ["Content not relevant", "Incorrect recipient"],
"AcceptReasons": ["Confirmed interest", "Interested in details"],
"RequireRejectReason": false,
"RequireAcceptReason": false,
"AllowRefusal": true,
"BatchPushNotificationUrl": "https://client.callback.url/batch-notifications"
}
Request Examples to finalize a Batch
Scheduling a Batch:
PATCH /v2/EviNotice/Batches/{batchid}
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"State": "Submitted",
"ScheduledDate": "2024-11-15T10:00:00Z"
}
Reverting a Batch to Draft:
PATCH /v2/EviNotice/Batches/{batchid}
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
{
"State": "Draft"
}
Response Example
The endpoint will return an HTTP status code:
200 OK if the batch was successfully updated.
400 Bad Request if conflicting parameters (
ScheduledDate
WithoutState
) are included in the request or if the input is invalid.404 Not Found if the specified
batchid
does not exist.
Notes
This
BatchId
should be stored for use in subsequent endpoints that allow adding recipients, attachments, and finalizing the configuration for the bulk email.The system automatically checks if the user has enough credits for the email and adjusts the credit based on the messages finally processed.
Timezone:
Ensure the
ScheduledDate
datetime is in a standard format (e.g., ISO 8601) and considers timezone differences.