Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm Subscriber Endpoint #1550

Open
2 tasks
TylerMatteo opened this issue Oct 18, 2024 · 3 comments
Open
2 tasks

Confirm Subscriber Endpoint #1550

TylerMatteo opened this issue Oct 18, 2024 · 3 comments
Assignees

Comments

@TylerMatteo
Copy link
Contributor

TylerMatteo commented Oct 18, 2024

Create a PATCH endpoint in ZAP Search to update subscriber custom properties.

New endpoint should exist as PATCH to /subscribers/<uuid>. For now, request body should only expect one property that lets us set the user's "confirmed" property to 1

{
    "confirmed": 1
}
  • Validate the request body and attempt to update the "confirmed" property for a user to the given value:
  • The UUID in the path params should be used to look up the user based on their anonymous_id property in SendGrid

See #1560 for details on what confirmed custom field will be in SendGrid. It should be zap_staging_confirmed for staging and zap_production_confirmed for production.

@TylerMatteo
Copy link
Contributor Author

Dependent on #1560

@dhochbaum-dcp
Copy link
Collaborator

Is there a benefit to having user signup confirmation having the same endpoint as updating user subscriptions?

@TylerMatteo
Copy link
Contributor Author

Is there a benefit to having user signup confirmation having the same endpoint as updating user subscriptions?

Yes - it's a best practice to create endpoints around "resources" (in this case subscribers) and the standard HTTP methods (POST, GET, PATCH, etc) whenever possible. Instead of having an endpoint specifically for "confirming" a subscriber, we can have an endpoint for the general task of editing a subscriber's information and it can be used for editing confirmation status as well as subscriptions.

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

No branches or pull requests

3 participants