{ "endpoints": [ { "name": "Basic Pages", "methods": [ { "MethodName": "Index", "Synopsis": "Shows a list of the basic pages in the system", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/basic_pages", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the basic page" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Create", "Synopsis": "Creates a basic page for a site", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/basic_pages", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the basic page" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "a JSON representation of the new basic page" } ] }, { "MethodName": "Update", "Synopsis": "Updates the attributes of a basic page", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/basic_pages/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the basic page" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the basic page" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON containing updates" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes a basic page", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/basic_pages/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the basic page" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the basic page" } ] } ] }, { "name": "Blog Posts", "methods": [ { "MethodName": "Index", "Synopsis": "Shows a list of blog's posts", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/blogs/:id/posts", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Match", "Synopsis": "Find a blog post by its external id", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/blogs/:id/match", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" }, { "Name": "external_id", "Required": "N", "Default": "1", "Type": "int", "Description": "the external id of the post" } ] }, { "MethodName": "Create", "Synopsis": "Creates a new blog post", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/blogs/:blog_id/posts", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "blog_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" }, { "Name": "body", "Required": "Y", "Default": "1", "Type": "json", "Description": "a JSON representation of the new post" } ] }, { "MethodName": "Update", "Synopsis": "Updates the attributes of a blog post", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/blogs/:blog_id/posts/:blog_post_id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "blog_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" }, { "Name": "blog_post_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" }, { "Name": "body", "Required": "Y", "Default": "1", "Type": "json", "Description": "JSON containing updates" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes a blog post", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/blogs/:blog_id/posts/:blog_post_id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "blog_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" }, { "Name": "blog_post_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" } ] } ] }, { "name": "Blogs", "methods": [ { "MethodName": "Index", "Synopsis": "Shows a list of all blogs", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/blogs", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Show the details of a blog", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/blogs/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" } ] }, { "MethodName": "Create", "Synopsis": "Creates a new blog", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/blogs", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "body", "Required": "Y", "Default": "1", "Type": "json", "Description": "a JSON representation of the new blog" } ] }, { "MethodName": "Update", "Synopsis": "Updates the attributes of a blog", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/blogs/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" }, { "Name": "body", "Required": "Y", "Default": "1", "Type": "json", "Description": "JSON containing updates" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes a blog", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/blogs/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the blog" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the blog" } ] } ] }, { "name": "Calendars", "methods": [ { "MethodName": "Index", "Synopsis": "Shows a list of calendars", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/calendars", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the calendars" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Show the details of a calendar", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/calendars/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the calendar" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the calendar" } ] }, { "MethodName": "Create", "Synopsis": "Creates a new calendar", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/calendars", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the calendar" }, { "Name": "body", "Required": "Y", "Default": "1", "Type": "json", "Description": "a JSON representation of the new calendar" } ] }, { "MethodName": "Update", "Synopsis": "Updates the attributes of a calendar", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/calendars/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the calendar" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the calendar" }, { "Name": "body", "Required": "Y", "Default": "1", "Type": "json", "Description": "JSON containing updates" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes a calendar", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/calendars/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the calendar" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the calendar" } ] } ] }, { "name": "Campaign Data", "methods": [ { "MethodName": "Show", "Synopsis": "Shows campaign metadata about the nation", "HTTPMethod": "GET", "URI": "/campaign_data", "parameters": [ ] } ] }, { "name": "Contacts", "methods": [ { "MethodName": "Index", "Synopsis": "View a paginated list of a person's contacts", "HTTPMethod": "GET", "URI": "/people/:person_id/contacts", "parameters": [ { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the person's ID" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Create", "Synopsis": "Record a contact for a person", "HTTPMethod": "POST", "URI": "/people/:person_id/contacts", "parameters": [ { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the person's ID" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "a JSON representation of the new contact" } ] } ] }, { "name": "Contact Types", "methods": [ { "MethodName": "Index", "Synopsis": "Returns paginated list of nation-defined contact types", "HTTPMethod": "GET", "URI": "/settings/contact_types", "parameters": [ { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Create", "Synopsis": "Creates a new contact type", "HTTPMethod": "POST", "URI": "/settings/contact_types", "parameters": [ { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "a JSON representation of the new contact type" } ] }, { "MethodName": "Update", "Synopsis": "Updates an existing contact type", "HTTPMethod": "PUT", "URI": "/settings/contact_types/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the existing contact type" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "a JSON representation of the updates to make" } ] }, { "MethodName": "Destroy", "Synopsis": "Destroys a contact type", "HTTPMethod": "DELETE", "URI": "/settings/contact_types/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the existing contact type" } ] }, { "MethodName": "List Methods", "Synopsis": "Lists all contact methods", "HTTPMethod": "GET", "URI": "/settings/contact_methods", "parameters": [ ] }, { "MethodName": "List Statuses", "Synopsis": "Lists all contact status types", "HTTPMethod": "GET", "URI": "/settings/contact_statuses", "parameters": [ ] } ] }, { "name": "Donations", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of donations", "HTTPMethod": "GET", "URI": "/donations", "parameters": [ { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Create", "Synopsis": "Creates a donation with the provided data", "HTTPMethod": "POST", "URI": "/donations", "parameters": [ { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON representation of a donation" } ] }, { "MethodName": "Update", "Synopsis": "Updates a donation with the provided data", "HTTPMethod": "PUT", "URI": "/donations/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The donation's ID" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for updating the donation" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes the donation with the matching ID", "HTTPMethod": "DELETE", "URI": "/donations/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The donation's ID" } ] } ] }, { "name": "Events", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of events", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/events", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" }, { "Name": "tags", "Required": "N", "Default": null, "Type": "string", "Description": "tags that must be present on the event" }, { "Name": "starting", "Required": "N", "Default": null, "Type": "string", "Description": "earliest starting time" }, { "Name": "until", "Required": "N", "Default": null, "Type": "string", "Description": "latest ending time" }, { "Name": "calendar_id", "Required": "N", "Default": null, "Type": "int", "Description": "the ID of the calendar from which events should be scoped" } ] }, { "MethodName": "Show", "Synopsis": "Returns an event", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/events/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the event" } ] }, { "MethodName": "Create", "Synopsis": "Creates a event with the provided data", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/events", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON representation of a event" } ] }, { "MethodName": "Update", "Synopsis": "Updates a event with the provided data", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/events/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The event's ID" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for updating the event" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes the event with the matching ID", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/events/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The event's ID" } ] }, { "MethodName": "RSVPs", "Synopsis": "Lists all RSVPs for an event", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/events/:id/rsvps", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The event's ID" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "RSVP Create", "Synopsis": "Creates an RSVP for an event", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/events/:id/rsvps", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The event's ID" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "A JSON representation of the new post" } ] }, { "MethodName": "RSVP Update", "Synopsis": "Updates an existing RSVP", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/events/:event_id/rsvps/:rsvp_id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the event" }, { "Name": "event_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The event's ID" }, { "Name": "rsvp_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The RSVP's ID" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON attributes for updating the RSVP" } ] } ] }, { "name": "Imports", "methods": [ { "MethodName": "Show", "Synopsis": "Shows the status of an import", "HTTPMethod": "GET", "URI": "/imports/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the import" } ] }, { "MethodName": "Create", "Synopsis": "Creates a import with the provided data", "HTTPMethod": "POST", "URI": "/imports", "parameters": [ { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON representation of the import" } ] }, { "MethodName": "Result", "Synopsis": "Gets the import results and error csv file.", "HTTPMethod": "GET", "URI": "/imports/:id/result", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the import" } ] } ] }, { "name": "Exports", "methods": [ { "MethodName": "Create List", "Synopsis": "Creates a list export with the provided data", "HTTPMethod": "POST", "URI": "/list/:list_id/exports", "parameters": [ { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON representation of the export" } ] }, { "MethodName": "Show", "Synopsis": "Shows the status of a list export.", "HTTPMethod": "GET", "URI": "/exports/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the export" } ] }, { "MethodName": "Delete", "Synopsis": "Delete the export", "HTTPMethod": "DELETE", "URI": "/exports/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the export" } ] } ] }, { "name": "Lists", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of created custom lists", "HTTPMethod": "GET", "URI": "/lists", "parameters": [ { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "People", "Synopsis": "Returns people stored in a list", "HTTPMethod": "GET", "URI": "/lists/:id/people", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The list's ID" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Create", "Synopsis": "Creates a list with the provided data", "HTTPMethod": "POST", "URI": "/lists", "parameters": [ { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON representation of the list to create" } ] }, { "MethodName": "Update", "Synopsis": "Updates a list with the provided data", "HTTPMethod": "PUT", "URI": "/lists/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The list's ID" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for updating the list" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes the list with the matching ID", "HTTPMethod": "DELETE", "URI": "/lists/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The list's ID" } ] }, { "MethodName": "Add people", "Synopsis": "Adds people to a list", "HTTPMethod": "POST", "URI": "/lists/:list_id/people", "parameters": [ { "Name": "list_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the list" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "A JSON hash containing the people to add to the list" } ] }, { "MethodName": "Destroy people", "Synopsis": "Removes people from a list", "HTTPMethod": "DELETE", "URI": "/lists/:list_id/people", "parameters": [ { "Name": "list_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the list" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "A JSON hash containing the people to remove from the list" } ] }, { "MethodName": "Listing Create (deprecated)", "Synopsis": "Adds a person to a list", "HTTPMethod": "POST", "URI": "/lists/:list_id/listings", "parameters": [ { "Name": "list_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the list" }, { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the person to add to the list" } ] }, { "MethodName": "Listing Deletion (deprecated)", "Synopsis": "Drops a person from a list", "HTTPMethod": "DELETE", "URI": "/lists/:list_id/listings/:person_id", "parameters": [ { "Name": "list_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the list" }, { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the person to drop from the list" } ] }, { "MethodName": "Add tag", "Synopsis": "Adds a tag to all of the list members", "HTTPMethod": "POST", "URI": "/lists/:list_id/tag/:tag", "parameters": [ { "Name": "list_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the list" }, { "Name": "tag", "Required": "Y", "Default": null, "Type": "string", "Description": "The name of the tag to use" } ] }, { "MethodName": "Delete tag", "Synopsis": "Deletes the tag from all of the list members", "HTTPMethod": "DELETE", "URI": "/lists/:list_id/tag/:tag", "parameters": [ { "Name": "list_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the list" }, { "Name": "tag", "Required": "Y", "Default": null, "Type": "string", "Description": "The name of the tag to use" } ] } ] }, { "name": "Memberships", "methods": [ { "MethodName": "Index", "Synopsis": "Lists all memberships for a person", "HTTPMethod": "GET", "URI": "/people/:person_id/memberships", "parameters": [ { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The person's ID" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "Which page to return" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "The number of listings to return per page" } ] }, { "MethodName": "Create", "Synopsis": "Creates a membership", "HTTPMethod": "POST", "URI": "/people/:person_id/memberships", "parameters": [ { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The person's ID" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for the new membership" } ] }, { "MethodName": "Update", "Synopsis": "Updates a membership", "HTTPMethod": "PUT", "URI": "/people/:person_id/memberships", "parameters": [ { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The person's ID" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for updating a membership" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes a membership from the person", "HTTPMethod": "DELETE", "URI": "/people/:person_id/memberships/:name", "parameters": [ { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The person's ID" }, { "Name": "name", "Required": "Y", "Default": null, "Type": "string", "Description": "The name of the membership" } ] } ] }, { "name": "Page Attachments", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of a page's file attachments", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/:page_slug/attachments", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The slug of the site the page lives on" }, { "Name": "page_slug", "Required": "Y", "Default": "1", "Type": "string", "Description": "The page's slug" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Creates a new file attachment for a page", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/:page_slug/attachments/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The slug of the site the page lives on" }, { "Name": "page_slug", "Required": "Y", "Default": "1", "Type": "string", "Description": "The page's slug" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the page attachment" } ] }, { "MethodName": "Create", "Synopsis": "Creates a new file attachment for a page", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/:page_slug/attachments", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The slug of the site the page lives on" }, { "Name": "page_slug", "Required": "Y", "Default": "1", "Type": "string", "Description": "The page's slug" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "A JSON representation of the attachment" } ] }, { "MethodName": "Destroy", "Synopsis": "Destroys a file attachment for a page", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/:page_slug/attachments/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The slug of the site the page lives on" }, { "Name": "page_slug", "Required": "Y", "Default": "1", "Type": "string", "Description": "The page's slug" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The ID of the page attachment" } ] } ] }, { "name": "People", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of people", "HTTPMethod": "GET", "URI": "/people", "parameters": [ { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Returns a full representation of the person", "HTTPMethod": "GET", "URI": "/people/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": "1", "Type": "int", "Description": "the person's id" } ] }, { "MethodName": "Match", "Synopsis": "Finds people that match certain attributes exactly", "HTTPMethod": "GET", "URI": "/people/match", "parameters": [ { "Name": "email", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "first_name", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "last_name", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "phone", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "mobile", "Required": "N", "Default": null, "Type": "string", "Description": null } ] }, { "MethodName": "Search", "Synopsis": "Search for people using non-unique traits", "HTTPMethod": "GET", "URI": "/people/search", "parameters": [ { "Name": "first_name", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "last_name", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "city", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "state", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "sex", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "birthdate", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "updated_since", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "with_mobile", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "custom_values", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "civicrm_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "county_file_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "datatrust_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "dw_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "external_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "media_market_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "membership_level_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "ngp_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "pf_strat_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "rnc_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "rnc_regid", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "salesforce_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "state_file_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "van_id", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": null }, { "Name": "per_page", "Required": "N", "Default": "100", "Type": "int", "Description": null } ] }, { "MethodName": "Nearby", "Synopsis": "Searches for people near a location defined by latitude and longitude", "HTTPMethod": "GET", "URI": "/people/nearby", "parameters": [ { "Name": "location", "Required": "Y", "Default": "34.049031,-118.251399", "Type": "string", "Description": "origin of search in the format \"latitude,longitude\"" }, { "Name": "distance", "Required": "N", "Default": "1", "Type": "int", "Description": "radius in miles for which to include results" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to show per page" } ] }, { "MethodName": "Me", "Synopsis": "Returns the access token's resource owner's representation", "HTTPMethod": "GET", "URI": "/people/me", "parameters": [ ] }, { "MethodName": "Register", "Synopsis": "Starts user registration person for the given person", "HTTPMethod": "GET", "URI": "/people/:id/register", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The person's ID" } ] }, { "MethodName": "Taggings", "Synopsis": "Returns all taggings for a given person", "HTTPMethod": "GET", "URI": "/people/:id/taggings", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the person" } ] }, { "MethodName": "Tag Person", "Synopsis": "Tags a person", "HTTPMethod": "PUT", "URI": "/people/:id/taggings", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the person" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON with tagging information" } ] }, { "MethodName": "Tag Removal", "Synopsis": "Removes a tag from a person", "HTTPMethod": "DELETE", "URI": "/people/:id/taggings/:tag", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the person" }, { "Name": "tag", "Required": "Y", "Default": null, "Type": "string", "Description": "the name of the tag" } ] }, { "MethodName": "Bulk Tag Removal", "Synopsis": "Removes tags from a person", "HTTPMethod": "DELETE", "URI": "/people/:id/taggings", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the person" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "the tagging resource" } ] }, { "MethodName": "Political Capital", "Synopsis": "Returns a paginated list of a person's capitals", "HTTPMethod": "GET", "URI": "/people/:id/capitals", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the person" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to show per page" } ] }, { "MethodName": "Political Capital Create", "Synopsis": "Creates capital for the given person", "HTTPMethod": "POST", "URI": "/people/:id/capitals", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the person" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON representation of the capital to create" } ] }, { "MethodName": "Political Capital Destroy", "Synopsis": "Destroys capital for a person", "HTTPMethod": "DELETE", "URI": "/people/:person_id/capitals/:capital_id", "parameters": [ { "Name": "person_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the person" }, { "Name": "capital_id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the capital to destroy" } ] }, { "MethodName": "Create", "Synopsis": "Creates a person with the provided data", "HTTPMethod": "POST", "URI": "/people", "parameters": [ { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON representation of the person to create" } ] }, { "MethodName": "Update", "Synopsis": "Updates a person with the provided data", "HTTPMethod": "PUT", "URI": "/people/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The person's ID" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for updating the person" } ] }, { "MethodName": "Push", "Synopsis": "Updates a matched person or creates a new one if the person doesn't exist", "HTTPMethod": "PUT", "URI": "/people/push", "parameters": [ { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for updating/matching the person" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes the person with the matching ID", "HTTPMethod": "DELETE", "URI": "/people/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The person's ID" } ] } ] }, { "name": "People Tags", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of previously used tags", "HTTPMethod": "GET", "URI": "/tags", "parameters": [ { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "People", "Synopsis": "Searches for people with the given tag", "HTTPMethod": "GET", "URI": "/tags/:tag/people", "parameters": [ { "Name": "tag", "Required": "Y", "Default": null, "Type": "string", "Description": "the name of the tag" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] } ] }, { "name": "Sites", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of all sites", "HTTPMethod": "GET", "URI": "/sites", "parameters": [ { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] } ] }, { "name": "Survey Responses", "methods": [ { "MethodName": "Index", "Synopsis": "Lists all survey responses", "HTTPMethod": "GET", "URI": "/survey_responses", "parameters": [ { "Name": "start_time", "Required": "N", "Default": null, "Type": "string", "Description": "the starting time for results" }, { "Name": "end_time", "Required": "N", "Default": null, "Type": "string", "Description": "the ending time for results" }, { "Name": "survey_id", "Required": "N", "Default": null, "Type": "int", "Description": "the id for a parent survey" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Create", "Synopsis": "Creates responses for a survey", "HTTPMethod": "POST", "URI": "/survey_responses", "parameters": [ { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "a JSON representation of the survey responses" } ] } ] }, { "name": "Surveys", "methods": [ { "MethodName": "Index", "Synopsis": "Shows a list of all surveys for the a site", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/surveys", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the survey" }, { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Create", "Synopsis": "Creates a survey for a site", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/surveys", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the survey" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "a JSON representation of the new survey" } ] }, { "MethodName": "Update", "Synopsis": "Updates the attributes of a survey", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/surveys/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the survey" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the survey" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON containing updates" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes a survey", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/surveys/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "the site holding the survey" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID of the survey" } ] } ] }, { "name": "Webhooks", "methods": [ { "MethodName": "Index", "Synopsis": "Lists all webhooks", "HTTPMethod": "GET", "URI": "/webhooks", "parameters": [ { "Name": "page", "Required": "N", "Default": "1", "Type": "int", "Description": "result page number" }, { "Name": "per_page", "Required": "N", "Default": "10", "Type": "int", "Description": "number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Shows the details of an individual webhook", "HTTPMethod": "GET", "URI": "/webhooks/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "string", "Description": "the ID of the webhook to display" } ] }, { "MethodName": "Create", "Synopsis": "Creates a new webhook", "HTTPMethod": "POST", "URI": "/webhooks", "parameters": [ { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "a JSON representation of the new webhook" } ] }, { "MethodName": "Destroy", "Synopsis": "Destroys a webhook", "HTTPMethod": "DELETE", "URI": "/webhooks/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the ID a webhook" } ] } ] } ] }