Skip to content

Conversation

@coplat
Copy link
Contributor

@coplat coplat commented Dec 29, 2025

Description of change

Previously, the send offer endpoint was a singular endpoint with the delivery method specified within the body of the request.

In order to improve API clarity this PR adds:

  • POST /offers/send-offer-to-individual for email delivery.
  • POST /offers/send-offer-to-organization for organizational target_url delivery.

BREAKING CHANGE

This PR deprecates the old offers/send endpoint.

How the change has been tested

Updated Postman collection. Existing tests pass.

Definition of Done checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have successfully tested this change in a docker environment

@coplat coplat self-assigned this Dec 29, 2025
@coplat coplat changed the title feat: add separate endpoints for email and URL credential offer delivery feat: separate endpoints for individual and organizational credential offer delivery Jan 2, 2026
@coplat coplat changed the title feat: separate endpoints for individual and organizational credential offer delivery feat: separate offer delivery endpoints Jan 2, 2026
@coplat coplat changed the title feat: separate offer delivery endpoints refactor: separate offer delivery endpoints Jan 2, 2026
@coplat coplat marked this pull request as ready for review January 2, 2026 10:04
"method": "GET",
"header": [],
"url": {
"raw": "{{HOST}}/v0/keys/list-all",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some endpoints in this updated Postman collection are unrelated to the code changes in this PR, right?

},
"url": {
"raw": "{{HOST}}/v0/offers/send",
"raw": "{{HOST}}/v0/offers/send-offer-to-organization",
Copy link
Contributor

@daniel-mader daniel-mader Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change since the old endpoint (/offers/send) would not work any longer. The type of commit is thus not a refactor:, but a feat: (including a BREAKING CHANGE in the body).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated^

.route("/offers", post(offers).get(all_offers))
.route("/offers/{offer_id}", get(offer))
.route("/offers/send", post(send)),
.route("/offers/send-offer-to-individual", post(email_offer))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight inconsistency here between the endpoint names and the handler functions: you called it email_offer and not individual_offer (compared to organization_offer).

@coplat coplat added the BREAKING CHANGE A change to the API that requires a major release. label Jan 5, 2026
@coplat coplat changed the title refactor: separate offer delivery endpoints feat: separate offer delivery endpoints Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING CHANGE A change to the API that requires a major release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants