{ "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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 posts for a blog", "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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 blog post" } ] }, { "MethodName": "Show", "Synopsis": "Show the details of a blog post", "HTTPMethod": "GET", "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 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 post" }, { "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 post" } ] } ] }, { "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "MethodName": "Search", "Synopsis": "Search for donations with provided attributes", "HTTPMethod": "GET", "URI": "/donations/search", "parameters": [ { "Name": "created_since", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "succeeded_since", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "failed_since", "Required": "N", "Default": null, "Type": "string", "Description": null }, { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "a 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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 event's ID" } ] }, { "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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
(Note: 'person_id' attribute is required)" } ] }, { "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
(Note: 'person_id' attribute is required)" } ] } ] }, { "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": "Export List", "Synopsis": "Starts an export of a list", "HTTPMethod": "POST", "URI": "/lists/:list_id/exports", "parameters": [ { "Name": "list_id", "Required": "Y", "Default": null, "Type": "int", "Description": "ID of the list to export" }, { "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "a 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 list's ID" }, { "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 list's ID" }, { "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 list's ID" }, { "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 list's ID" }, { "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 list's ID" }, { "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 list's ID" }, { "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Returns the details of the 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": "Paths", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of paths and path steps", "HTTPMethod": "GET", "URI": "/paths", "parameters": [ { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] } ] }, { "name": "People", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of people", "HTTPMethod": "GET", "URI": "/people", "parameters": [ { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "MethodName": "Count", "Synopsis": "Returns a count of people in the nation", "HTTPMethod": "GET", "URI": "/people/count", "parameters": [ ] }, { "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": "deprecated" }, { "Name": "last_name", "Required": "N", "Default": null, "Type": "string", "Description": "deprecated" }, { "Name": "phone", "Required": "N", "Default": null, "Type": "string", "Description": "deprecated" }, { "Name": "mobile", "Required": "N", "Default": null, "Type": "string", "Description": "deprecated" } ] }, { "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "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 person's id" } ] }, { "MethodName": "Tag Person", "Synopsis": "Tags a person", "HTTPMethod": "PUT", "URI": "/people/:id/taggings", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the person's id" }, { "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 person's ID" }, { "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 person's ID" }, { "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 person's ID" }, { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "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 person's ID" }, { "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 person's ID" }, { "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": "a 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": "Add", "Synopsis": "Updates a matched person (without overriding data) or creates a new one if the person doesn't exist", "HTTPMethod": "PUT", "URI": "/people/add", "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" } ] }, { "MethodName": "Private Note Create", "Synopsis": "Creates a private note for the given person", "HTTPMethod": "POST", "URI": "/people/:id/notes", "parameters": [ { "Name": "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 note to create" } ] } ] }, { "name": "People Tags", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of previously used tags", "HTTPMethod": "GET", "URI": "/tags", "parameters": [ { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] } ] }, { "name": "Petitions", "methods": [ { "MethodName": "Index", "Synopsis": "Returns the list of petitions in the site", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/petitions", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petitions" }, { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Returns data for a single petition", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/petitions/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" } ] }, { "MethodName": "Create", "Synopsis": "Creates a new petition", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/petitions", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON representation of the new petition" } ] }, { "MethodName": "Update", "Synopsis": "Updates a single petition", "HTTPMethod": "PUT", "URI": "/sites/:site_slug/pages/petitions/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON containing updates" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes a petition", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/petitions/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" } ] }, { "MethodName": "Signatures Index", "Synopsis": "Returns list of signatures in a petition", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/petitions/:petition_id/signatures", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "petition_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" }, { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "MethodName": "Show Signature", "Synopsis": "Returns the signature", "HTTPMethod": "GET", "URI": "/sites/:site_slug/pages/petitions/:petition_id/signatures/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "petition_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the signature" } ] }, { "MethodName": "Create Signature", "Synopsis": "Creates a new signature for a petition", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/petitions/:petition_id/signatures", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "petition_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON representation of the new signature" } ] }, { "MethodName": "Update Signature", "Synopsis": "Updates a signature for a petition", "HTTPMethod": "POST", "URI": "/sites/:site_slug/pages/petitions/:petition_id/signatures/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "petition_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the signature" }, { "Name": "body", "Required": "Y", "Default": null, "Type": "json", "Description": "JSON representation of the new signature" } ] }, { "MethodName": "Destroy Signature", "Synopsis": "Removes signature from petition", "HTTPMethod": "DELETE", "URI": "/sites/:site_slug/pages/petitions/:petition_id/signatures/:id", "parameters": [ { "Name": "site_slug", "Required": "Y", "Default": null, "Type": "string", "Description": "The site holding the petition" }, { "Name": "petition_id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the petition" }, { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "The id of the signature" } ] } ] }, { "name": "Precincts", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of current precincts", "HTTPMethod": "GET", "URI": "/precincts", "parameters": [ { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum number of results to return" } ] }, { "MethodName": "Show", "Synopsis": "Returns a representation of the precinct", "HTTPMethod": "GET", "URI": "/precincts/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": "1", "Type": "int", "Description": "the precinct's ID" } ] }, { "MethodName": "Create", "Synopsis": "Creates a precinct with the provided data", "HTTPMethod": "POST", "URI": "/precincts", "parameters": [ { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "a JSON representation of the precinct to create" } ] }, { "MethodName": "Update", "Synopsis": "Updates a precinct with the provided data", "HTTPMethod": "PUT", "URI": "/precincts/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the precinct's ID" }, { "Name": "body", "Required": "Y", "Default": "{}", "Type": "json", "Description": "JSON attributes for updating the precinct" } ] }, { "MethodName": "Destroy", "Synopsis": "Removes the precinct with the matching ID", "HTTPMethod": "DELETE", "URI": "/precincts/:id", "parameters": [ { "Name": "id", "Required": "Y", "Default": null, "Type": "int", "Description": "the precinct's ID" } ] } ] }, { "name": "Sites", "methods": [ { "MethodName": "Index", "Synopsis": "Returns a list of all sites", "HTTPMethod": "GET", "URI": "/sites", "parameters": [ { "Name": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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": "__token", "Required": "N", "Default": null, "Type": "string", "Description": "pagination token" }, { "Name": "__nonce", "Required": "N", "Default": null, "Type": "string", "Description": "pagination nonce" }, { "Name": "limit", "Required": "N", "Default": "10", "Type": "int", "Description": "maximum 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" } ] } ] } ] }