Api Docs - PurposeOpen/Platform GitHub Wiki

REST API Resources

Movements

Resource Description
GET /api/:locale/movements/:movement_id(.:format) Returns movement and homepage info

Members

Resource Description
POST /api/movements/:movement_id/members(.:format) Creates a new member for the movement

| | GET /api/movements/:movement_id/members(.:format) | Returns the requested member's data |

Action Pages

Resource Description
GET /api/:locale/movements/:movement_id/action_pages/:id/member_fields(.:format) Retrieves the required or missing member's fields for the requested member (identified by her email)

| | POST /api/:locale/movements/:movement_id/action_pages/:id/take_action(.:format) | Take action on the requested action page's ask module which can be a Petition, Donation, Email Targets, Join or Unsubscribe. | | GET /api/:locale/movements/:movement_id/action_pages/:id/preview(.:format) | Gets the preview of the Action Page with the requested ID | | GET /api/:locale/movements/:movement_id/action_pages/:id(.:format) | Gets the Action Page with the requested ID | | | GET /api/:locale/movements/:movement_id/action_pages/:id/share_counts(.:format) | Retrieves the shares count for the requested action page |

Donations

Resource Description
POST /api/movements/:movement_id/action_pages/:id/donation_payment_error(.:format) Sends a notification email to Platform admins reporting payment error.

| | GET /api/movements/:movement_id/donations/:id(.:format) | Returns a Donation with the requested subscription ID | | POST /api/movements/:movement_id/donations/confirm_payment(.:format) | Marks a donation as confirmed (active)
| | POST /api/movements/:movement_id/donations/add_payment(.:format) | Adds a new payment for a recurring donation | | POST /api/movements/:movement_id/donations/handle_failed_payment(.:format) | Processes the failed payment, sending an error notification email to admins |

Content Pages

Resource Description
GET /api/:locale/movements/:movement_id/content_pages/:id/preview(.:format) Gets the preview of the Content Page with the requested ID

| | GET /api/:locale/movements/:movement_id/content_pages/:id(.:format) | Gets the Content Page with the requested ID |

Activity Feed

Resource Description
GET /api/:locale/movements/:movement_id/activity(.:format) Retrieves the activity feed for the requested Content Module ID if provided, otherwise it retrieves the activity feed for the whole movement

Shares

Resource Description
POST /api/movements/:movement_id/shares(.:format) Creates a new share for the requested action page, user and type of share

External Activity Events

Resource Description
POST /api/movements/:movement_id/external_activity_events(.:format) Create an external activity event. This is useful for integrating 3rd party action and member data (for example from ControlShift) with the Platform's member data and list cutting/blasting features.