/
PATCH v2/EviSMS/Batches/{batchid}

PATCH v2/EviSMS/Batches/{batchid}

HTTP Method: PATCH

Description:

This endpoint allows you to define the characteristics of each EviSMS that makes up the batch. It is also used to finalize and schedule the batch shipment once its configuration is complete.

Input Parameters

  • Description (string): Description of the bulk SMS.

  • IssuerName (string): Name of the sender for the bulk SMS.

  • Text (String): SMS message content.

  • 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.

      • 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/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" }

Request Examples to finalize a Batch

  1. 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" }
  1. 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 Without State) are included in the request or if the input is invalid.

  • 404 Not Found if the specified batchid does not exist.

Notes

  1. Batch ID Requirement:

    • The batchid in the URL must correspond to an existing batch created via the initial Submit endpoint.

  2. The system automatically checks if the user has enough credits for the SMS and adjusts the credit based on the messages finally processed.

  3. Timezone:

    • Ensure the ScheduledDate datetime is in a standard format (e.g., ISO 8601) and considers timezone differences.