Skip to content

Instantly share code, notes, and snippets.

@mojowen
Forked from DTwigs/lead_dist_reducer_actions
Last active October 5, 2016 16:46
Show Gist options
  • Save mojowen/bd0f6bad2c14191064f021be0242b567 to your computer and use it in GitHub Desktop.
Save mojowen/bd0f6bad2c14191064f021be0242b567 to your computer and use it in GitHub Desktop.
Leads Reducer Actions and APi Calls
Leads Actions:
------------
GetLeads (URL: /locations/:location_id/leads?filter=<active|archived>)
------------
GetLead (URL: /locations/:location_id/leads/:lead_id)
------------
UpdateLead (URL: /locations/:location_id/leads/:lead_id)
Accept (put) =
API payload: { new_status: "accept" }
API Response: The updated lead
Decline (put) =
API payload: { reason: "", new_status: "reject", other_reason: "" }
API Response: The updated lead
Archive (put) =
API payload: { archived: true }
API Response: The updated lead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment