Skip to main content

API Developers Forum

We're thrilled to see all the great development going on with the NationBuilder API, and want to open this forum up for public feedback, helps and hints, questions and more. This resource is curated by the NationBuilder API Team - our goal is developers helping developers, so we definitely want to hear from you. You can also use the tags to rank posts. Thanks!

Please check your e-mail for a link to activate your account.
Sort by

Oauth2 token validation REST resource

Is there a way to validate authorization token? For example, Google has such an endpoint https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=MYTOKEN which returns token info if it is a valid one. It is doable with Facebook as well. graph.facebook.com/debug_token?input_token={token-to-inspect}&access_token={app-token-or-admin-token} Does Nation Builder provide similar endpoint? Thanks

considering

There is not an endpoint to allow authorization token validation but is something we are considering. There is no timeline at this moment for when this feature will be rolled out but please follow this request to get email updates.

Official response from

4 reactions

API imports result call returns an empty failure_csv field.

When importing people using the import call from the API, although the Errors CSV file is available in the people import report, and that the correct number of failure is reported in the response, the field failure_csv is returned empty (null). Here's an example of responses: {"result":{"rows_updated":0,"rows_succeeded":0,"rows_failed":9,"failure_csv":null}} {"result":{"rows_updated":2360,"rows_succeeded":2612,"rows_failed":24,"failure_csv":null}} The response match exactly the report on the control panel, except for the file which is only available on from the control panel. The following params are used for the import call: 'type' => 'people', 'file' => [base 64 encoded csv file], 'is_overwritable' => 'true' Thanks for your help.

completed

Unfortunately it isn't possible to access the error file via the API. I have corrected the error in our documentation that suggested this was possible.

Thanks.

Official response from

1 reaction

Add user to the nation builder after registration on wordpress site

How can I add user to the nation builder after his registration on wordpress site

completed

 

You can develop an API connection between your WordPress site and NationBuilder. Learn more from our quick start guide about this process. 

There is an existing application called Gravity Forms that some NationBuilder users use with their WordPress websites to establish a connection between the two platforms. You can also use a 3rd party NationBuilder integration such as 123FormBuilder. 

 

Official response from

1 reaction

Search by any parameter

I’m working with my nation’s donation data, and I’d like to be able to search by more than just succeeded since, created since, failed since, and donor id. 

Is there any reason why I can’t pass tracking_code_id as a search parameter, or any of the other fields? Right now, my flow looks like this: 

Pull the entire list of donations that might match (say, by succeeded since date, or just pull them all)
Parse through and check the value/run my own search algorithm on the entire results I just pulled 
Do my processing 

Since I’m sometimes interested in searching all of our donations, that means each time I do this, I’m pulling down almost all of our donations, even if only 5-10 of them will match a criteria, like a tracking_code_id – it’s much slower than it needs to be, I think. 

Have I missed something? Is there a better way to use the search endpoint? What’s in the way of giving us access to this?

considering

Tyler,

At this point we have only exposed the succeeded_at, created_since, failed_since, and donor_id search params for the donation search endpoint. There is not a way to run a targeted query via the API for just tracking codes.

We will consider adding a tracking_code_slug param in the future and will update this card and notify you when that is complete.

Official response from

4 reactions

Inconsistent API Functionality

I suspect this is custom validation used across many API endpoints, but I specifically refer to the People Memberships endpoint (i.e. PUT to /people/:person_id/memberships) The validator rejects null values for expires_on, and will only accept strings. If we want to set expires_on to null, we must send it a non-date string. The API will reject "expires_on": null with an error, but will return "expires_on": null if the attribute sent is "expires_on": "". Further, the validator does not catch non-date strings. Sending "expires_on": "donuts" also results in the response "expires_on": null. Really, the output should match the input, and the date validator should check to see whether the attribute sent matches a valid value (i.e. ISO8601 date or null). Instead, the validator only rejects null values and the API translates any non-ISO8601 string to null.

2 reactions

People Create Endpoint documentation

The documentation, and API spec both list address3 as a field, however it doesn't seem to display on the front-end. I suspect the field was deprecated on the front-end but maintained in the external API for posterity. Also, the People documentation lists primary address as an attached resource, however it's not recorded as a read-only resource. I haven't had a deep look into the People API yet, but I'm fairly certain there will be other similar resources and attributes attached.

completed

Hi Jeremy,

You are correct about the address 3 field. Most address formats use Address 1, Address 2 and then City and State.

The primary address is set from the other addresses, so you can't write directly to it. You can read how the primary address is determined here - https://nationbuilder.com/edit_primary_address#automatic

Official response from

2 reactions

Blog Posts by Author

Is it possible to get a list of blog posts created by a specific author via the API? If so, can you link me to the page with the info for this because I cannot seem to locate anything about it. Thanks, Wil

completed

Unfortunately there is not a search endpoint for blog posts. As an alternative, you could Index all blog posts and then have your own app search specifically for the author_id field. 

Official response from

1 reaction

Documentation Error

Hello, I found a small mistake in the API documentation. On https://nationbuilder.com/people_api under the Push Endpoint, it says " If a match is not found, a new person is created and a 201 status code is returned", which is correct: https://cl.ly/rUFV But further down the page under "Creation example" it says "A new record will be created with the provided attributes and you will receive a response of status 200" (note the 200 instead of 201): https://cl.ly/rV8G Minor issue, but wanted to let you know! Thanks!

completed

Hi Alex, thanks for bringing this issue to our attention. Indeed, when a person is created via the Push Endpoint, the 201 response code ought to be the accurate result, not the 200 response code. We've updated the People API documentation accordingly.

Official response from

1 reaction

API Access for Development

Our organization is using Nation Builder for their website and we would like to start developing a tool to manage our Blog, which will need to hook into the Blog API. I can easily code this, but need to get access to the API. What steps do I need to perform in order to gain access to the API? Thanks, Wil

Add your reaction

'phone' resource is blank when using people/show endpoint

I'm looking at a record in my nation that contains a phone number but when I use people/show endpoint the 'phone' resource is null. 'phone_normalized' does contain the number, however.

Add your reaction

Incorrect Donations API documentation

The /donations/index endpoint has a maximum limit of 1000, not 100. https://nationbuilder.com/donations_api#index_endpoint

completed

An update has been made to the API restricting the max number of results per request to 100.

Official response from

3 reactions

On creating Person, primary_address not rejected

The /person endpoint is generally quite strict on push, and it rejects invalid attributes on the object passed to it. For instance, fields which do not exist on the object or under custom fields will return a 400 with the error code "invalid_custom_field". However, the pseudo-attribute primary_address is accepted but no action is taken if it is passed. This should either be handled (i.e. a new address is created and assigned to the person), or the request should be rejected as invalid.

Add your reaction

Issues with country_code attribute of Address resource

The Address resource documentation under the People API describes the country_code attribute as "country code". However, it appears the standard being used is ISO-3166-1 alpha-2 with upper-case characters. This is a requirement, entering a code which doesn't comply with this causes problems with NationBuilder's front-end. However, these requirements are not documented nor are they verified when an address resource is submitted.

completed

Great point Jeremy. The documentation has been updated to reflect this:

https://nationbuilder.com/people_api

https://github.com/nationbuilder/api_docs/blob/master/doc/people_api.md

Official response from

1 reaction

How can a nation identify itself to an installed app?

I am building an app integration. I've implemented the OAuth flow described at https://nationbuilder.com/api_quickstart. Suppose that two nations, N1 and N2, both install my app. As a result of following the OAuth flow, my app has now obtained API tokens for both nations, so it can make API requests on behalf of either one. I want to limit who can prompt my app to act on behalf of a given nation. For example only someone affiliated with N1should be able to prompt my app to access N1's data via the NB API. Conversely someone affiliated with N1 should not be able to prompt my app to access N2's data. In order to limit access appropriately, my app needs a way to know which nation is asking it to do something. How can nations identify themselves to my app in a secure way?

completed

Usually the apps are authenticated through OAuth for each individual nation. It wouldn't be a good idea to let people who install your app to have access to all other nations who are authenticated through the app. In general, each nation will have individual OAuth Client ID's, Client Secrets and Auth Tokens. Since only admins of that nation can generate auth tokens (through the OAuth process), it should inherently be impossible to access data from another nation from within your app (depending on how it was built). Apps are identified through the Client ID and Client secret that are registered individually through the Developer tab in NationBuilder from within each specific nation.

If you could send us more specifics on how you are building the app, we would be happy to help suss this out with you!

Please send us an email to help@nationbuilder.com and we can work with you on getting this resolved.

Official response from

1 reaction

API Explorer broken on donations and people search endpoints

As per my previous two posts concerning these matters, the people and search endpoints return a 400 when provided with unexpected URL parameters. The API Explorer provides them with one of these, __proto__. This should be removed so that the API Explorer actually works on these endpoints. https://nationbuilder.com/jeremyunite/bad_request_on_people_search_endpoint https://nationbuilder.com/jeremyunite/bad_request_on_donations_search_endpoint

considering

Thanks for noting this Jeremy. We have flagged it with our product and engineering team. There is no set timeline on when this change will go into effect but we will update this posting when it does.

Official response from

4 reactions

People -> Donations Relationship

People -> Donations is a one-to-many relationship, but there doesn't appear to be a way to get donations in this method. I haven't been able to find a Donations attribute on a Person (either full or restricted), there doesn't appear to be a Donations resource endpoint which allows searching by Donor ID, and the Donations search endpoint also doesn't allow Donor ID. Is there a way to get Donations from a single Person without getting all the Donations from the API, then filtering them after-the-fact?

1 reaction

Bad Request on /donations/search endpoint

Similar to my previous post, this endpoint is also needlessly strict. The API Explorer is also broken on this as a result. These endpoints need, at the very least, documentation explaining the inconsistent strictness, and the __proto__ URL parameter needs to be removed from the API Explorer. Moreover, this requirement to not include any unexpected URL parameters should be removed from the endpoints.

2 reactions

Donations API Documentation

http://nationbuilder.com/donations_api The Donations API description of the is_private field reads "false if the donation should not be posted publicly on the site". Is this correct? If is_private == false, then the donation is private; and if is_private == true, then the donation isn't private?

completed

I can definitely see why that language has caused confusion. The "is_private" field relates to a check box in the nation called "Don't post this publicly on the site" so when marking "is_private" as false you're unchecking that box meaning you do want the donation to display. Setting to true checks the box meaning you do not want it to display. I've updated the section in http://nationbuilder.com/donations_api

api_donation.png

Official response from

2 reactions

Bad Request on /people/search endpoint

If any unexpected parameters are sent to the /people/search endpoint, it fails with a 400 Bad Request, and doesn't explain further in the body text. This is a problem, especially considering the API Explorer adds an empty __proto__ URL param, which is rejected by the API with the message above. Really, the API should ignore any irrelevant URL parameters, rather than just mysteriously dying. If there's a technical limitation around these for some reason, the response text should at least be more verbose.

completed

Overall, we don't have any specialized error reporting through the API. If the request is incorrect, you are properly sent back a 400 bad request (or other respective response). We could set up the API to provide errors depending on typos or if the request contains irrelevant URL parameters, but we haven't prioritized this sort of project. As an alternative to the API Explorer, you could use your own tools to send requests through our "REST API" in NationBuilder. For example, you can use "curl" to send requests through terminal on a Mac (or command prompt on Windows).

Official response from

3 reactions

Custom fields – Define Text vs Checkbox

Currently, custom fields return a name and value. In the case of the Checkbox field type, there is no way to tell this apart from a Text field type. Where the custom fields for each nation is unknown, it is impossible to tell them apart and you end up with a situation where checkbox custom fields have to display a value of 1 or 0.

Add your reaction

API Explorer not generating calls or any JSON

I just generated my first test token and have submitted it on the API Explorer along with my nation's slug. However none of the endpoints are generating any JSON feedback. In my browser Explorer, I see the following error in my console: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data. Can anyone help? Do I need to follow any additional steps to get the API Explorer working? I just want to set up a simple AJAX call within my nation's page template. This is my first time using the API. Any help is really appreciated! Thank you.

completed

I tested the API explorer on our end using a known functional API token and I wasn't able to replicate the issue you have described.

Could you reach out to us with the nation where you generated the test token? I would be happy to test out the token you are using on your end to make sure that the tokens are valid.

Official response from

1 reaction

Tags Endpoint Doesn't Accept Forward Slashes

I'm trying to use the GET /tags/:tag/people endpoint, searching for a tag such as "Ajax/Bowmanville" and getting a 404 response. It works fine with a tag like "Ajax-Pickering" which doesn't have the front slash. I've tried replacing the front slashes with %2F, as suggested here http://nationbuilder.com/mdunbar50/issue_with_space_and_in_people_tags_search but it doesn't help. Any advice would help! Thanks

considering

We have confirmed this bug but do not have a timeline for when a fix for this issue will be implemented. But we've noted it and will post any updates here. 

Official response from

2 reactions

Using Nationbuilders donation form on Wordpress

Hi I'm working on moving a Nationbuilder site over to Wordpress for the CMS. There is a request to keep the donation form the same, but it looks to me like this is not possible. I think I can use a Wordpress donations integration/plugin and after a donation is taken, send the information to the Nationbuilder API. Is it possible to use the nationbuilder donations for with Wordpress? Or is that a no go?

completed

There are several approaches to this:

  1. Use WP for the rest of the site and NB for the donation form. The way this would work is that when someone selects a 'donation' button on the WP site they will be redirected to the NB donation form to process the payment.
  2. Use WP for the entire site and build an application that can consume processed donation data from the payment processor and make a request to our donation API to create a record of the transaction.
  3. Redirect from the WP site to a payment processor that integrates with our donation API which will create the record in NationBuilder without you having to build an application as mentioned in (2) above.

Official response from

3 reactions

Precinct name when assigned by NBEC

The People API seems to return a blank result for precinct_name for a person when the precinct is assigned via the NationBuilder Election Centre. Is this a bug or by design? If by design, how do we manage this?

incomplete

Hey FieldEdge team -

I'm seeing this value in the person response, but not as currently documented. Are you able to fetch from the "nbec-precinct: nbec_code" parameter?

Official response from

1 reaction

retrieve information about current user on external site

Hello! Is there a mechanism for retrieving information about the current user in order to customize the experience for members who are interacting with external sites? With other CRMs we're able to identify the current user either through a cookie that is set via tracking redirect when members click links in emails sent by the CRM, or via a token included as a URL parameter appended to links in emails that are sent via the CRM. We use those tokens to retrieve information about the member when they reach our platform. It allows us to skip form completion steps by simply reusing the biographical information already stored in the CRM for that session. I think we asked NationBuilder about this feature years ago, but bumping it up in case something has been added to support this feature in the mean time. We just had another customer ask us for this in order to support one-click signing of petitions without requiring the user to provide email & name each time.

considering

Hi Nathan,

Unfortunately the URL parameter appended to links in an email blast can still only be decoded on a NationBuilder page. With that being said, you can certainly append the user's NationBuilder ID number or any other signup variable to the URL in a non-encoded way. For example, if your NB ID number is 29378, you could type www.example.com?id={{ recipient.id }} into a blast to send them to www.example.com?id=29378. The you would need something on the other site to read and interpret the ID, which would be the more difficult part. If anyone has other suggestions, I am open to hearing them!

Thank you,
Brian Palmer
NationBuilder Support Technician

 

Official response from

2 reactions

Deleting an address

How can I delete an address through the API? I have tried using the people/:id endpoint but if I pass an object with something like "home_address": null it doesn't do anything. If I pass an address object with all the components set to null (ie { "address1": null, "address2":null, etc. }) I can see from the main GUI that the components have indeed been blanked but there is still a "delete address" button, which suggests that the address still exists on the system albeit with blank components.

completed

When clearing out the address types (home_address, billing_address, registered_address, or mailing_address), you would need to pass empty strings and null with the request.

 

For example, you could use this curl with the PUT request on the People endpoint here:

curl -v -X PUT --header "Content-Type: application/json" --header "Content-Type: application/json" —data '{  "person": {"home_address": {"address1": "","address2": "","address3": "","city": "","county": null,"state": null,"country_code": "","zip": null,"lat": null,"lng": null,"fips": null,"street_number": null,"street_prefix": null,"street_name": null,"street_type": null,"street_suffix": null,"unit_number": null,"zip4": null,"zip5": null,"sort_sequence": null,"delivery_point": null,"lot": null,"carrier_route": null}}}'https://NATIONSLUG.nationbuilder.com/api/v1/people/PERSONID?access_token=TOKEN

 

Make sure to change NATIONSLUG to the slug of your specific nation, PERSONID to the ID of the person you are looking to update in your database and change TOKEN to your API token that you can get through Settings > Developer > API Token.

If you continue to have problems with clearing out the address fields, let us know and we would be happy to help through email at help@nationbuilder.com

Official response from

1 reaction

Endpoint for primary_country and registered_country?

The export csv contains address fields such as “primary_country” and “registered_country”, which contains the name of the country. The API People-endpoint does not contain those fields. The API does contain the “country_code” key. Is there another endpoint that allows me to read/write to the country name fields e.g. “primary_country” and “registered_country”?

completed

In general, you wouldn't be able to write to any specific "Primary" information because "Primary" is an address category and not a specific address type. For example, you are able to write to billing address, mailing address, registered address or home address and each one of those address types could be listed as the "Primary" address within the Control Panel.  

For example, if you wanted to add a country code to the registered address for a person in your database, you could send this json payload with your POST or PUT request through our API:

{
"person": {
  "registered_address": {
    "state": "TX",
    "country_code": "US"
  }
 }
}

Similarly, you can change out the "registered_address" with "billing_address", "home_address", or "mailing_address", depending on which sort of address country code you are trying to modify. 

Official response from

1 reaction

PUT request

We're making a request to an offsite domain, and when I making a PUT request to the offsite server via $.ajax, it looks as if the authenticity token is being concatenated to the end of the stringified JSON object - this obviously causes problems when our offsite server attempts to parse the JSON object, it finds a "&authenticity_token=..." which is not valid JSON.

It looks as if the check of how the authenticity token should be appended (I snooped around a bit in the minified liquid files) is a bit naive. Yes, we're sending up JSON, but best practice (http://stackoverflow.com/a/12693986 <http://stackoverflow.com/a/12693986>) is to stringify with $.ajax first. The authenticity token attachment logic incorrectly interprets the stringified JSON to be a query string.

I have solved this for the most part by preventing this event handler from firing by including the 'global:false;' option in the AJAX request. Thanks!

4 reactions

Search people by precinct?

Is it possible to search for people by precinct? I'd like to use the API to find all people in a given precinct, so that I can build a strikethrough system for election day. 

 

Thanks

completed

You can not search for people by precinct. This is because the precinct is not a unique identifier for a person. 

See what is possible with the precinct API here.

See which attributes are searchable here under "Search Endpoint". 

Official response from

1 reaction

Get the Name and Abbreviation of Capital for a Nation

 

Is it possible to get the custom name and abbreviation that someone has assigned to the (political/social) capital feature?

For example, if someone has changed "Political Capital" to "My Community Points" ("MCP"), we want to use that as the label when displaying capital_amount_in_cents. Displaying "Political Capital" generically could confuse people in many cases.

 

 

completed

There are not currently resources for the name or abbreviation assigned to a nation's political capital.

That said, this sounds like a very useful feature and I recommend that you request that it be added through our product suggestion page!

Official response from

1 reaction

How to add a tag to user?

I have already used PUT people/:id/taggings api for that. But it is giving me response Bad Request Your browser sent a request that this server could not understand. [code] => 411 [content_type] => text/html )

completed

Hi there,

Try setting the Content-Type to application/json. I used the following curl command and received a 200 HTTP response:

curl -v -X PUT --header "Content-Type: application/json" "https://{slug}.nationbuilder.com/api/v1/people/{person_id}/taggings?access_token={token}" -d '{"tagging":{"tag":"{tag}"}}'

Official response from

1 reaction

Anedot integration does not push through records with invalid email addresses

It has been reported that the Anedot integration does not send donation information with invalid emails through to NationBuilder. If a donor mis-types their email address (such as .con or .ney), the information will not be sent through and there is no indication of which transactions were not synced with NationBuilder. This makes NationBuilder donation records inaccurate.

1 reaction

Add feature to list all people on a step through API

We have received reports that users may find it helpful to list all people on a specific step within a specific path using our API. Currently, we offer the ability to index paths and search people, but not the ability to search people on a specific path or step.

3 reactions

Duplicate records being returned when hitting the lists API

It seems that the data that we get when we pull through the API is different than the data that you get when you just download a CSV file from a nation. The result is that the lists we pull from your API had about 20% duplicates. 

completed

This is likely the outcome of using the export context type 'voter ballot'. The context type 'people' will return a single record per .csv file generated by the export API.

Voter ballot exports will have multiple rows with the same record because each row can contain a different election in which that record/person voted.

Official response from

1 reaction

Exports via API do not include "updated_at" field

The "updated_at" field is not included in exports initiated via the Export List endpoint;  "created_at" is included. Could "updated_at" be added please?

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

2 reactions

How to check if user has control panel access via API?

Hi all,

is it possible to check if the user has control panel access via the API? Perhaps also with their access level? Maybe using the /api/v1/people/me endpoint? Thanks!

considering

Craig,

It's currently not possible to know who has control panel access through the API. Permission sets aren't a resource the People API returns in the response body.

Official response from

3 reactions

Can't generate OAuth tokens

According to the API Authentication Quick Start Guide, I should be able to generate an Oauth client ID/secret for my nation via Settings > Apps > New App. However, I only see options for "Install new app" and "Installed apps". The former shows a list of 3rd-party apps, but no option to create a new one. Am I looking in the wrong place?

completed

As Theodis pointed out, this information is wrong. It is actually under Settings > Developer > Register app. The documentation has been updated and thank you for bringing it to our attention.

Official response from

2 reactions

Provide a way to list surveys through the API that do not require them to be on a Page.

Hi folks,

I want to use the surveys to let canvassers add extra details while they are contacting people using an app I am designing. Right now I am getting a list of surveys by hitting /api/v1/sites/:site_slug/pages/surveys

However, this only includes surveys that have a corresponding page made for them, so the user must first make a survey and *then* add it to a page on a site. Not the easiest!

Is it possible to just provide an endpoint that lists all surveys without requiring them to be on a page first?

Thanks!

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

2 reactions

People Search Endpoint - Updated since

What format is the "date" used in searches on the updated_since field in the people search endpont?

What is the granularity of the comparison, is it just a comparison of the date or is it really a combarison with the updated_at field of the record, which appears to have a resolution of 1s?

An example of using this api call might be useful.

1 reaction

Basic Pages API: Internal Styles

The content you can install in a page is inserted in the body of the page. It would be helpful if it was also possible to insert content into the head of the page, perhaps via an optional 'head' payload, in addition to the 'content' payload.

My use case is that I want to insert CSS as internal styles i.e. <style> ... </style> which can only be inserted in the head of the page. Note I need functionality that can't be deployed using inline styles (i.e. using the HTML style attribute).

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

1 reaction

Return a better error message when an API call is made to a nation, endpoint that does not exist

When making an API call to an invalid endpoint the response returns the HTML from a 404 page. A response body describing the issue (endpoint does not exist, nation does not exist) along with a 404 status would be preferred for debugging issues.

Example:


[17] pry(main)> NationBuilder::Client.new("foo", "bar").call(:donations, :index)
NationBuilder::ClientError: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>404 Error: The page you were looking for doesn't exist</title>
<style type="text/css">
body {
background: url(http://nationbuilder.s3.amazonaws.com/assets/404-grass.jpg) repeat top left;
color: #fff;
font-family: Lucida Grande, Lucida Sans Unicode, Garuda, sans-serif;
margin: 15px 0;
font-size: 1em;
}
#wrapper {
padding: 15px 0 0 45px;
}
#headline {
font-size: 2em;
font-weight: bold;
text-shadow: -1px -1px #333;
color: yellow;
}
#description {
font-size: 1.3em;
line-height: 1.8em;
color: #fff;
text-shadow: -1px -1px #333;
}
#footer {
clear: both;
font-size: 0.8em;
}
a:link, a:active, a:visited {
color: #ec7c31;
text-decoration: none;
}
a:hover {
text-decoration: none;
background-color: #fee34c;
color: #000;
}
#road {
margin-top: 15px;
}
</style>
</head>

<body>
<!-- This file lives in public/404.html -->

<div id="road">

<div id="wrapper">
<div id="headline">We couldn't find the page you were looking for.</div>
<div id="description">You may have mistyped the address or the page may have moved.</div>
</div>
<div id="road"><img src="http://nationbuilder.s3.amazonaws.com/assets/404-road.png" width="952" height="404"></div>
</div>

</body>
</html>
from [...]/gems/nationbuilder-rb-1.5.0/lib/nationbuilder/client.rb:129:in `parse_response_body'

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

1 reaction

Feature Request: get and add People relationships

It would be great to see the ability via the API to get any existing relationships a person has and add new ones, as you can do via the GUI.

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

6 reactions

Is there any way to ajax submit a form in NationBuilder?

considering

This is not possible with our current page infrastructure.

Official response from

7 reactions

How to get people that appear on "Contacted By" page on the data entry sheet of a list?

Hi all, do you know how can I use the API to get the same list of people that appear under "Contacted By" on the data entry sheet?

I'm working on a data entry app and would like to have similar functionality to be able to choose who contacted a person. Thanks!

completed

You can do this using the contact API/index endpoint and passing in the author_id parameter. A request using cURL would like something like this:

curl 'https://{slug}.nationbuilder.com/api/v1/contacts?author_id={id}&access_token={token}'

Official response from

11 reactions

Index of donations for a specific donor

Right now the Donations Index endpoints returns all donations in a nation. It would be great if the API allowed the donor ID to be specified and then only return donations that have been made by that person.

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

1 reaction

Basic Pages API: Restricting access to pages

In the GUI I can restrict access to a page, for example pages can be restricted to control panel users. However, I can't see any way of doing that via the Basic Pages API. Am I missing something?

The background is that I am writing an app that will periodically sync a Nation with an external database. I thought a good way to provide feedback on the operation of the app would be to populate a basic page on the Nation with status information. I would prefer that the page was only accessable by control panel users. Any other ideas?

- Andrew

completed

Setting 'who can view this page' is not an attribute with the basic page/create endpoint. 

Official response from

1 reaction

Link donation to a membership through API

Whenever we assign a membership to a person through API, it always shows "Dues amount" as "Free" under "Memberships" tab ("Edit" > "Memberships") on the person's profile. Is there a way to link a donation to the membership or just show an amount instead of "Free"?

considering

This issue has been confirmed but does not have a set timeline on when it will be fixed. Please follow this cards if you would like to receive email updates about the status of this issue.

Official response from

1 reaction

Can you assign point person through the API?

completed

Official response from

1 reaction

Please add Petitions and Petition Signatures to the NationBuilder API

This would be very powerful for a bunch of existing integrations as well as new ones. For example, it would enable a service like CallHub to support members signing petitions via SMS. It would enable email your MP tools to track against petition pages directly within NationBuilder. It would also enable tools to report on a nation's core activities and track successes across a great range of actions.

Ideally, it would allow developers of external tools to work with NationBuilder's petitions as well as petition signatures, in the same way that we can already work with events and RSVPs (that event resource provides the best analogy).

I would say the key components would be:

  1. Index endpoint (to return all petitions per site)
  2. Create endpoint (create a new petition)
  3. Show/update/delete endpoints (these are less important to us, but useful all the same :)
  4. Petition signature Count endpoint (return the number of people who have signed a given petition)
  5. Petition signature Index endpoint (return the NationBuilder IDs, first names and emails of everyone who has signed a given petition)
  6. Petition signature Create endpoint (add a new signatory to a given petition)

Thanks for considering!

considering

Thanks CodeNation! I'll move this over to the API forum for that team to take a look at! There isn't a timeline on this at the moment but definitely a good suggestion. 

Official response from

32 reactions

Get notes on person's profile via the API

With the current People API you can add a note to a person's profile which is great! However, it would be fantastic if you could also get those notes too via the API.

considering

This is something we will consider but does not have a timeline at the moment.

Official response from

13 reactions