HTTP Method: GET
Description:
This endpoint retrieves the details of a bulk email batch previously created in the system. The batchid
parameter in the URL is the unique identifier returned by the initial batch creation (Submit
) endpoint. Additional query parameters allow customization of the level of detail in the response.
Input Parameters (Query Parameters)
IncludeOptions (boolean, optional)
When set to
true
, populates theOptions
property in the response with its corresponding values. Default:false
.
IncludeRecipientsCount (boolean, optional)
When set to
true
, calculates and populates theRecipientsCount
property in the response with the total number of recipients. Default:false
.
IncludeAttachments (boolean, optional)
When set to
true
, populates theAttachments
property in the response with its corresponding values. Default:false
.
Output Parameters
Body (string): The message body of the email.
Subject (string): The subject of the email.
ScheduledFor (datetime, optional): The scheduled date and time for the batch to be sent.
State (string): The current state of the bulk email (e.g.,
Draft
,Scheduled
,Sent
).CreationDate (datetime): The creation date of the batch in UTC.
Description (string): Description of the bulk email batch.
BatchId (Guid): Unique identifier for the batch.
IssuerName (string): The sender's name.
RecipientsCount (int?, optional): The total number of recipients (if
IncludeRecipientsCount
istrue
).Attachments (array, optional): List of attachments (if
IncludeAttachments
istrue
), containing:DisplayName (string): Descriptive text for the file.
Data (string): File content in Base64.
FileName (string): Name of the file.
Options (object, optional, if
IncludeOptions
istrue
): Configuration details for the batch, including:CostCentre (string)
CertificationLevel (string)
LtaStorage (bool)
AffidavidKind (array)
Language (string)
AffidavitLanguage (string)
OnlineRetentionPeriod (int)
PushNotificationUrl (string)
PushNotificationFilter (array)
PushNotificationExtraData (string)
CommitmentOptions (string)
CommitmentCommentsAllowed (bool)
RejectReasons (array)
AcceptReasons (array)
RequireRejectReasons (bool)
RequireAcceptReasons (bool)
HideBanners (bool)
BatchPushNotificationUrl (string)
Request Example
Basic Request:
Code Block |
---|
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
GET /v2/EviMail/Batches/{batchid}
|
Request with Query Parameters:
Code Block |
---|
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN
GET /v2/EviMail/Batches/{batchid}?IncludeOptions=true&IncludeRecipientsCount=true&IncludeAttachments=true
|
Response Example
Response with All Details:
Code Block |
---|
{ "Body": "Dear {{FirstName}}, we are excited to have you onboard!", "Subject": "Welcome {{FirstName}}!", "ScheduledFor": "2024-11-15T10:00:00Z", "State": "Scheduled", "CreationDate": "2024-11-10T15:30:00Z", "Description": "Welcome campaign batch", "BatchId": "a5b1f3f2-5c73-4b6d-88b9-73d81a9c5f8e", "IssuerName": "Marketing Team", "RecipientsCount": 150, "Attachments": [ { "DisplayName": "User Guide", "Data": "JVBERi0xLjQKJcfs...Base64EncodedContent...", "FileName": "user_guide.pdf" } ], "Options": { "CostCentre": "Marketing", "CertificationLevel": "Basic", "LtaStorage": true, "Language": "en", "AffidavitLanguage": "en", "OnlineRetentionPeriod": 5, "PushNotificationUrl": "https://client.callback.url/notifications", "PushNotificationFilter": ["StatusChange", "DeliveryConfirmation"], "CommitmentOptions": "AcceptOrReject", "CommitmentCommentsAllowed": true, "RejectReasons": ["Content not relevant", "Incorrect recipient"], "AcceptReasons": ["Confirmed interest", "Interested in details"], "RequireRejectReasons": false, "RequireAcceptReasons": false, "HideBanners": true } } |
Notes
Flexible Detail Levels:
Use query parameters (
IncludeOptions
,IncludeRecipientsCount
,IncludeAttachments
) to control the detail level in the response.By default, all optional properties (
Options
,RecipientsCount
,Attachments
) are excluded.
Batch ID:
The
batchid
in the URL must correspond to an existing batch created in the system.
Efficient Retrieval:
Avoid setting unnecessary query parameters to reduce response size and improve performance.