Class WebhookController
java.lang.Object
com.minicrm.mini_crm_api.controllers.WebhookController
Controller for handling incoming webhooks from external services.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String>handleDeliveryReceipt(Map<String, String> payload) Accepts a delivery receipt and publishes it to a message queue for asynchronous batch processing.
-
Constructor Details
-
WebhookController
public WebhookController()
-
-
Method Details
-
handleDeliveryReceipt
@PostMapping("/delivery-receipt") public org.springframework.http.ResponseEntity<String> handleDeliveryReceipt(@RequestBody Map<String, String> payload) Accepts a delivery receipt and publishes it to a message queue for asynchronous batch processing. This endpoint returns immediately with a 202 Accepted status.- Parameters:
payload- A map containing the logId and the final delivery status.- Returns:
- A ResponseEntity with HTTP status 202 Accepted.
-