Skip to content

Added redemption_type to Offers Content API#26214

Merged
sagzy merged 1 commit intomainfrom
add-offers-redemption-type-to-content-api
Feb 4, 2026
Merged

Added redemption_type to Offers Content API#26214
sagzy merged 1 commit intomainfrom
add-offers-redemption-type-to-content-api

Conversation

@sagzy
Copy link
Contributor

@sagzy sagzy commented Feb 4, 2026

ref https://linear.app/ghost/issue/BER-3258/disable-offer-link-for-retention-offers

  • The new field redemption_type is set to signup for signup offers (default) and to retention for retention offers
  • With this change, we expose the redemption_type in Content API, so that it can be used by Portal to handle offers differently, based on their redemption type. For instance, retention offers are triggered during the cancellation flow and cannot be redeemed via an offer link

ref https://linear.app/ghost/issue/BER-3258/disable-offer-link-for-retention-offers

- The new field `redemption_type` is set to `signup` for signup offers (default) and to `retention` for retention offers
- With this change, we expose the `redemption_type` in Content API, so that it can be used by Portal to handle offers differently, based on their redemption type. For instance, retention offers are triggered during the cancellation flow and cannot be redeemed via an offer link
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

The Content API serializer for offers has been updated to include the redemption_type field in its output, sourced from the jsonModel object. The change is minimal with one line added and maintains existing functionality for non-Content API paths.

Changes

Cohort / File(s) Summary
Offers Serializer Enhancement
ghost/core/core/server/api/endpoints/utils/serializers/output/mappers/offers.js
Added redemption_type field to Content API serialized output, mapping from jsonModel.redemption_type.

Poem

🐰 A little field hops into view,
Redemption type, so fresh and new,
The offer mapper spreads its cheer,
One tiny line makes it all clear! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding the redemption_type field to the Offers Content API serializer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-offers-redemption-type-to-content-api

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sagzy sagzy merged commit 30d2a68 into main Feb 4, 2026
38 checks passed
@sagzy sagzy deleted the add-offers-redemption-type-to-content-api branch February 4, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants