Initiates the coupon issuance process with real-time notifications and event publishing. Creates new coupon with predefined business rules, handles duplicate request detection, and supports file attachments. Implements idempotency through request ID validation and automatic ID generation for new requests. Publishes domain events for downstream processing and sends real-time notifications to connected clients.
This endpoint starts the coupon issuing process. In case the request is already present in the system, the request will be rejected. If the requestId is not present, a new one will be created. Please check Genocs.Fiscanner.WebApi.Controllers.IssuingCouponRequest to get more details.
This endpoint creates new coupons with fixed business parameters (€15 discount, 15-day expiration, €50-500 threshold). Implements idempotency: duplicate requestId values are rejected to prevent accidental duplicate coupon creation. If requestId is not provided, generates a new GUID automatically for request tracking. Supports optional file upload for coupon images or attachments via multipart form data. Triggers real-time SignalR notifications to all connected clients about the new coupon issuance. Publishes CouponIssuingRequested domain event for saga orchestration and downstream processing.
Sample request:
POST /Issuing { "requestId": "123-456-789", "operatorId": "John Doe", "memberId": "M0001" }