HTTP Method: PATCH
Description:
This endpoint allows the creation of a request for a bulk SMS in EviSMS. Upon receiving the initial data for the bulk 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 SMS.
IssuerName (string): Name of the sender for the bulk SMS.
Text (String):
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 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.
HideBanners (bool, optional): Hides certification banners in the SMS.
BatchPushNotificationUrl (string, optional): URL to receive notifications once the process is complete.
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.
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"
.
Output Parameters
No output parameters.
The endpoint will only return an HTTP status code indicating the result of the operation.
Request Example
PATCH /v2/EviSMS/Batches Content-Type: application/json Authorization: Bearer YOUR_ACCESS_TOKEN { "Description": "Bulk invitation mailing", "IssuerName": "Marketing Team", "Text": "This is the content of the SMS" "CostCentre": "Marketing", "AffidavitKinds": ["Delivery"], "Language": "en", "AffidavitLanguage": "en", "OnlineRetentionPeriod": 1, "LtaStorage": false, "PushNotificationUrl": "https://client.callback.url/notifications", "PushNotificationFilter": ["Delivered", "Submitted"], "PushNotificationExtraData": "Spring Campaign", "HideBanners": true, "BatchPushNotificationUrl": "https://client.callback.url/batch-notifications" }
json { "BatchId": "a5b1f3f2-5c73-4b6d-88b9-73d81a9c5f8e" }
Request Examples to finalize a Batch
Scheduling a Batch:
PATCH /v2/EviSMS/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/EviSMS/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
Batch ID Requirement:
The
batchid
in the URL must correspond to an existing batch created via the initialSubmit
endpoint.
The system automatically checks if the user has enough credits for the SMS and adjusts the credit based on the messages finally processed.