Suggestions

Update a suggestion

Changed on

Updates a Suggestion.

Required attributes:

  • suggestion_box_id - ID of the SuggestionBox to add this Suggestion to
  • headline - Display name/title for the Suggestion

Optional attributes:

  • content - Further explanation of the Suggestion beyond the headline
  • slug - URL-friendly identifier (auto-generated from name if not provided)
  • status - Publication status (defaults to 'published' if not provided)
  • recruiter_id - Signup ID for the person to assign as the recruiter when Suggestions are submitted (defaults to null)
  • official_response - Official response to the Suggestion
  • response_type_id - Status/stage of the Suggestion (defaults to 7 - 'Submitted')
  • response_author_id - Signup ID for the person that provided the official response. (Defaults null, auto-set to the owner of the API key if not provided when first response is provided)
  • responded_at - When responded (defaults to null, auto-set when first responded)
  • notify_followers - Send email to suggestion followers when adding an official response (boolean, write-only, defaults to false)

You can provide just text, just status, or both combined to officially respond to a suggestion.

patch/api/v2/suggestions/{id}

Request

  • Base URL
    https://yournation.nationbuilder.com
  • Auth
    HTTP bearer

Request body

Example request

{
  "data": {
    "id": "1",
    "type": "suggestions",
    "attributes": {
      "content": "We should add more parking spaces downtown",
      "external_id": "ext-123",
      "headline": "Downtown Parking Improvement",
      "official_response": "Thank you for this suggestion. We will consider it in our next planning session.",
      "recruiter_id": "1",
      "responded_at": "2019-10-26T10:00:00-04:00",
      "response_author_id": "1",
      "response_type_id": 2,
      "slug": "my-page-slug",
      "status": "published",
      "suggestion_box_id": "123",
      "notify_followers": true
    }
  }
}

Response

move to different suggestion box

metaobject

Non-standard information about the document. Empty unless the endpoint has metadata to convey.

Example response

{
  "data": {
    "id": "1",
    "type": "suggestions",
    "attributes": {
      "content": "We should add more parking spaces downtown",
      "external_id": "ext-123",
      "headline": "Downtown Parking Improvement",
      "official_response": "Thank you for this suggestion. We will consider it in our next planning session.",
      "recruiter_id": "1",
      "responded_at": "2019-10-26T10:00:00-04:00",
      "response_author_id": "1",
      "response_type_id": 2,
      "slug": "my-page-slug",
      "status": "published",
      "suggestion_box_id": "123",
      "created_at": "2019-10-26T10:00:00-04:00",
      "page_id": "1",
      "site_id": "123",
      "updated_at": "2019-10-26T10:00:00-04:00"
    }
  },
  "included": [
    {
      "id": "1"
    }
  ]
}

Changes

    • breaking

      added subschema #2 to the request body allOf list

    • breaking

      the request's body type changed from object to no type

    • breaking

      the response's body type changed from object to no type for status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • info

      added the media type application/vnd.api+json to the request body

    • info

      added subschema #2 to the response body allOf list for the response status

    • info

      media type application/json was changed to a more specific media type application/vnd.api+json for the response status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      endpoint added