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

New subscriber endpoint (part 2) #1547

Open
5 tasks
TylerMatteo opened this issue Oct 11, 2024 · 1 comment
Open
5 tasks

New subscriber endpoint (part 2) #1547

TylerMatteo opened this issue Oct 11, 2024 · 1 comment
Assignees

Comments

@TylerMatteo
Copy link
Contributor

TylerMatteo commented Oct 11, 2024

Add the following functionality to the endpoint built in #1544

  • Add a subscriptions object to the request body that can have properties for each of the 60 subscription topics.
    • The key for these properties should be the community district IDs found here - (K01, K02, etc). For citywide, use CW.
    • The value will be 1 to indicate a subscription
  • Update the endpoint code to set the corresponding custom fields for the requested subscriptions to 1 on contact creation
  • Set the "confirmed" custom field to 0 for the corresponding environment for the user on contact creation

Example of the expected request body for a user subscribing to districts K01, M01, and citywide:

{
  "email": "[email protected]",
  "subscriptions": {
    "K01": 1,
    "M01": 1,
    "CW": 1
  }
}
@TylerMatteo
Copy link
Contributor Author

Dependent on #1560

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

2 participants