Capa de interoperabilidad · Prueba técnica de arquitectura

Anexo E. Contratos

Método y ruta Scope Servicio Requisito del enunciado
GET /v1/stock stock:read inventory-service Stock por SKU, tienda y canal
GET /v1/prices prices:read pricing-service Precio por SKU, canal y cliente
POST /v1/orders orders:write order-service Crear orden
GET /v1/orders/{orderId} orders:read order-service Consultar estado de orden
POST /v1/webhooks/subscriptions webhooks:manage webhook-service Notificaciones
GET /v1/webhooks/subscriptions webhooks:manage webhook-service Notificaciones
DELETE /v1/webhooks/subscriptions/{id} webhooks:manage webhook-service Notificaciones

Cabeceras comunes: Authorization: Bearer <JWT> (obligatoria); X-Correlation-Id (opcional en la petición, siempre en la respuesta); Idempotency-Key (obligatoria en POST /v1/orders); RateLimit-Limit, RateLimit-Remaining y RateLimit-Reset en la respuesta; Retry-After en 429 y 503.

Contratos completos en el repositorio: contracts/openapi/interop-api.v1.yaml (OpenAPI), contracts/asyncapi/eventos.v1.yaml (AsyncAPI) y contracts/proto/andesretail/inventory/v1/inventory.proto (gRPC). Los tres pasan lint en cada cambio.