Offers are the core decisioning entity in KaireonAI. Each offer represents a recommendation that can be scored, ranked, and delivered to a customer through one or more channels.All offers support soft-delete (a deletedAt timestamp is set instead of permanent removal), version tracking (the version field auto-increments on every update), and audit logging (before/after snapshots are recorded for every CRUD operation).
Returns a paginated list of offers for the current tenant, ordered by creation date (newest first). Each offer includes its creatives, category, and sub-category relations. By default, soft-deleted offers are excluded.
Product type label (e.g., "credit_card", "loan"). Used by PRIE scoring for relevance matching.
margin
No
number
Profit margin value. Feeds into the Impact (I) component of PRIE scoring.
revenueValue
No
number
Expected revenue value. Feeds into the Impact (I) component of PRIE scoring.
metadata
No
object
Arbitrary key-value metadata.
Setting mandatory to true requires the admin role and all three governance fields: mandatoryReason, mandatoryExpiresAt, and mandatoryApprovedBy. Server-side validations enforce:
mandatoryExpiresAt must parse to a valid date and be strictly in the future (creates fail with 400 otherwise).
mandatoryApprovedBy must reference a real user in the same tenant.
That user must have role admin (rejecting attempts to set non-admin approvers).
Updates an existing offer. Only provided fields are changed. Triggers auto-assembly on status transitions. The version field is auto-incremented and a before/after audit snapshot is recorded.
Soft-deletes an offer by setting its deletedAt timestamp. Cascade behavior: all associated creatives are also soft-deleted. The version is incremented on the offer and each cascaded creative. An audit log entry is recorded for every affected entity.
Missing id query parameter, entity not found, or entity already deleted.
401
Missing or invalid API key / session.
403
Insufficient role.
To restore a soft-deleted offer, use POST /api/v1/restore?entityType=offer&id={offerId} (admin only). Restoring an offer does not automatically restore cascaded creatives — you must restore them individually.