Skip to main content
The notification service (notification-service) is a lightweight listener that accepts inbound event payloads from other SmartLogix microservices—for example, low-stock alerts from ms-inventario or order status changes from ms-pedidos. It accepts any valid JSON object, logs the payload, and returns a confirmation string.
This service runs directly on port 8085 and is not routed through the API gateway at http://localhost:8080. Use http://localhost:8085 as the base URL for all calls to these endpoints. No Authorization header is required.

POST /notificaciones

Receive a notification payload. The body can be any valid JSON object; the service logs it and returns a fixed confirmation string. This endpoint is called by other services within the SmartLogix cluster—you rarely need to invoke it manually.

Request body

(any key)
any
Any JSON key/value pair. The notification service accepts an arbitrary Map<String, Object> and does not validate the schema. Common keys sent by other services include type, message, productId, orderId, and timestamp.

Response

(response body)
string
required
A fixed confirmation string: "Notificación procesada".

Status codes

CodeMeaning
200Payload received and logged.
400Request body is not valid JSON.

Example

curl --request POST \
  --url http://localhost:8085/notificaciones \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "LOW_STOCK_ALERT",
    "productId": 42,
    "sku": "SL-BOX-001",
    "stockActual": 12,
    "umbralMinimo": 50,
    "timestamp": "2026-04-20T10:00:00"
  }'
Example response (200)
Notificación procesada

GET /notificaciones/health

Health check endpoint. Returns a plain string confirming the service is running. Use this to verify connectivity to port 8085 before sending notification payloads.

Status codes

CodeMeaning
200Service is running. Response body is "notification-service UP".

Example

curl --request GET \
  --url http://localhost:8085/notificaciones/health
Example response (200)
notification-service UP