Take Action - PurposeOpen/Platform GitHub Wiki
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.
Parameters | |
---|---|
movement_idMandatory
|
Movement Id for which we want to retrieve member fields |
localeMandatory
|
Action Page locale. Used to set the member's language |
idMandatory
|
Action Page Id |
member_info[first_name]Optional
|
Member First Name |
member_info[last_name]Optional
|
Member Last Name |
member_info[country_iso]Optional
|
Member Country |
member_info[postcode]Optional
|
Member Postcode address |
member_info[email]Mandatory
|
Member email address |
member_info[mobile_number]Optional
|
Member mobile number |
member_info[home_number]Optional
|
Member home number |
member_info[suburb]Optional
|
Member suburb address |
member_info[street_address]Optional
|
Member address |
member_info[opt_in_ip_address]Optional
|
IP address of the member |
member_info[opt_in_url]Optional
|
URL of the page from which the member took action |
action_info[comment]Petitions Optional
|
Petition comment |
action_info[currency]Donations Mandatory
|
Donation Currency |
action_info[amount]Donations Mandatory
|
Donation Amount |
action_info[payment_method]Donations Mandatory
|
Donation Payment Method |
action_info[order_id]Donations Optional
|
Donation order id |
action_info[transaction_id]Donations Optional
|
Donation transaction id |
action_info[subscription_id]Donations Optional
|
Donation subscription id |
action_info[subscription_amount]Donations Optional
|
Donation Subscription amount |
action_info[confirmed]Donations Mandatory
|
Donation confirmation |
action_info[frequency]Donations Mandatory
|
Donation frequency |
action_info[cc_me]Email Targets Optional
|
Emails Targets cc/me |
action_info[subject]Email Targets Optional
|
Email Targets Subject |
action_info[body]Email Targets Optional
|
Email Targets Body |
tAll Actions Optional
|
Email tracking hash |
201
if successful
400
if member already took the action
500
if any other error occur
Field | Description |
---|---|
next_page_identifier | Slug of the page to redirect after take action on current work-flow |
member_id | Member identifier |
POST /api/en/movements/test-movement/action_pages/1234/take_action.json
Content-Type: application/x-www-form-urlencoded
Petition example:
member_info%5Bemail%5D=newmember%40example.com&member_info%5Bfirst_name%5D=john&member_info%5Blast_name%5D=doe&member_info%5Bcountry_iso%5D=us&member_info%5Bpostcode%5D=10011&member_info%5Bmobile_number%5D=5555555&member_info%5Bhome_number%5D=5554444&member_info%5Bsuburb%5D=ny&member_info%5Bstreet_address%5D=5th%20avenue%201234&action_info%5Bcomment%5D=this%20is%20a%20great%20comment
Donation example:
member_info%5Bemail%5D=newmember%40example.com&member_info%5Bfirst_name%5D=John&member_info%5Blast_name%5D=Doe&member_info%5Bcountry_iso%5D=us&member_info%5Bpostcode%5D=10011&member_info%5Bmobile_number%5D=5555555&member_info%5Bhome_number%5D=5554444&member_info%5Bsuburb%5D=NY&member_info%5Bstreet_address%5D=5th%20Avenue%201234&action_info%5Bcurrency%5D=usd&action_info%5Bamount%5D=1000&action_info%5Bpayment_method%5D=credit_card&action_info%5Border_id%5D=1234-12345-1234-12345&action_info%5Btransaction_id%5D=6789-67890-6789-67890&action_info%5Bconfirmed%5D=true&action_info%5Bfrequency%5D=one_off
201 (OK)
Content-Type: application/json
{"next_page_identifier":1234,
"member_id":1000
}