---
swagger: '2.0'
info:
  version: 1.0.0
  title: GiveCampus BBCRM Interactions API
  description: |-
    The BBCRM Interactions API allows schools using Blackbaud CRM to submit and manage interaction data in GiveCampus. <h2>BBCRM Interactions vs Contact Reports</h2> <p>This endpoint is specifically designed for schools using Blackbaud CRM. Unlike the standard Contact Reports API, BBCRM Interactions combines Contact Reports and Tasks into a single unified "Interactions" data model that mirrors BBCRM's structure.</p> <p><b>Use this endpoint when:</b></p> <ul>
      <li>Your school uses Blackbaud CRM with a single "Interactions" data model</li>
      <li>You need to manage pending/upcoming interactions (not just finalized)</li>
      <li>You need to link interactions to solicitation plans</li>
      <li>You need to track linked task states (stage, state, due date)</li>
    </ul> <p><b>Use the Contact Reports API when:</b></p> <ul>
      <li>Your school uses a separate Contact Reports and Tasks model</li>
      <li>You only need to submit finalized contact reports</li>
    </ul> <h2>STATE Mappings</h2> <p>When creating or updating interactions with a linked task, the <code>linked_task.state</code> value is mapped to internal GiveCampus task states:</p> <table border="1" cellpadding="5">
      <tr><th>BBCRM State (Input)</th><th>GiveCampus Task State</th></tr>
      <tr><td>canceled, cancelled</td><td>dismissed</td></tr>
      <tr><td>completed</td><td>completed</td></tr>
      <tr><td>declined</td><td>dismissed</td></tr>
      <tr><td>dismissed</td><td>dismissed</td></tr>
      <tr><td>pending</td><td>upcoming</td></tr>
      <tr><td>planned</td><td>upcoming</td></tr>
      <tr><td>postponed</td><td>postponed</td></tr>
      <tr><td>upcoming</td><td>upcoming</td></tr>
    </table> <p><b>Notes:</b></p> <ul>
      <li>States are case-insensitive (e.g., "Pending", "pending", "PENDING" all work)</li>
      <li>When <code>linked_task.state</code> is "completed" AND no <code>solicitation_plan.external_id</code> is provided, no task is created</li>
      <li>When <code>linked_task.state</code> is "completed" WITH a <code>solicitation_plan.external_id</code>, a task IS created in completed state</li>
    </ul> <h2>Security</h2> <p>All requests require a bearer token via the Authorization header, generated by a school administrator in the GiveCampus UI.</p> <p>All API responses are delivered over HTTPS and require TLS 1.2 or 1.3.</p> <h2>Request Lifecycle</h2> <p>The API delivers data asynchronously using a request-and-poll pattern:</p> <ol>
      <li><strong>Submit your request</strong> — Call the endpoint with your desired parameters. You'll receive a <code>request_id</code> and a <code>status</code> of <code>in_progress</code>.</li>
      <li><strong>Poll for results</strong> — Call <code>/results/{request_id}</code> every 2–5 seconds until <code>status</code> changes to <code>completed</code> (or <code>error</code>).</li>
      <li><strong>Download your data</strong> — When complete, the response includes a <code>download_url</code> containing a JSON array of objects matching the model defined below.</li>
    </ol> <p>Most requests complete within a few seconds.</p> <h2>Testing</h2> <p>Use the "Try it out" button to test and inspect API behavior before integrating.</p> <p><i>GiveCampus Proprietary and Confidential</i></p>
basePath: "/api"
securityDefinitions:
  Bearer:
    type: apiKey
    name: Authorization
    in: header
    description: Enter the token with the `Bearer ` prefix, e.g. "Bearer XXXXXXXXXXXXX".
paths:
  "/bbcrm_interactions/search":
    post:
      tags:
      - BBCRM Interactions
      summary: Search BBCRM interactions
      description: 'Search for BBCRM interactions based on various criteria. Returns
        a list of matching interactions, including standalone tasks (tasks without
        linked interactions).

        '
      operationId: searchBbcrmInteractions
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: search_request
        required: true
        schema:
          type: object
          "$ref": "#/definitions/SearchBbcrmInteraction"
      security:
      - Bearer: []
      responses:
        '200':
          description: Submitted successfully. Returns a request ID.
          schema:
            "$ref": "#/definitions/ApiRequest"
        '400':
          description: Invalid request. Check required fields.
  "/bbcrm_interactions":
    post:
      tags:
      - BBCRM Interactions
      summary: Create BBCRM interactions
      description: Submit one or more BBCRM interactions. Each interaction must include
        required fields and can optionally include linked task or custom field information.
        The external_id must be unique - submitting an existing external_id will result
        in a "record_already_exists" error.
      operationId: createBbcrmInteractions
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: bbcrm_interactions
        required: true
        schema:
          type: array
          items:
            "$ref": "#/definitions/CreateBbcrmInteraction"
      security:
      - Bearer: []
      responses:
        '200':
          description: Submitted successfully. Returns a request ID.
          schema:
            "$ref": "#/definitions/ApiRequest"
        '400':
          description: Invalid request. Check required fields.
    put:
      tags:
      - BBCRM Interactions
      summary: Update BBCRM interactions
      description: Update one or more existing BBCRM interactions. Each interaction
        must include required fields and reference an existing external_id. If the
        external_id does not exist, a "record_not_found" error will be returned.
      operationId: updateBbcrmInteractions
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: bbcrm_interactions
        required: true
        schema:
          type: array
          items:
            "$ref": "#/definitions/UpdateBbcrmInteraction"
      security:
      - Bearer: []
      responses:
        '200':
          description: Submitted successfully. Returns a request ID.
          schema:
            "$ref": "#/definitions/ApiRequest"
        '400':
          description: Invalid request. Check required fields.
  "/results/{request_id}":
    get:
      tags:
      - Results
      summary: Get processing results
      description: Returns status and download URL once the submitted BBCRM interactions
        have been processed.
      operationId: getBbcrmInteractionResults
      produces:
      - application/json
      parameters:
      - in: path
        name: request_id
        type: string
        required: true
        description: Request ID returned from submission
      security:
      - Bearer: []
      responses:
        '200':
          description: Status and download URL
          schema:
            "$ref": "#/definitions/ApiResults"
        '202':
          description: returns a status for your request
          schema:
            "$ref": "../shared/types/in_progress_api_results.yaml"
        '400':
          description: Invalid request
definitions:
  SearchBbcrmInteraction:
    type: object
    properties:
      ids:
        type: array
        items:
          type: string
        description: Filter by BBCRM Interaction external IDs
        example:
        - INT-001
        - INT-002
      constituent_external_ids:
        type: array
        items:
          type: string
        description: Filter by constituent (person) external IDs
        example:
        - CONST-001
        - CONST-002
      gift_officer_external_ids:
        type: array
        items:
          type: string
        description: Filter by gift officer external IDs
        example:
        - GO-001
        - GO-002
      date_of_interaction:
        type: integer
        description: Filter by interactions on or after this date (Unix timestamp
          in seconds)
        example: 1704067200
      created_at:
        type: integer
        description: Filter by interactions created on or after this date (Unix timestamp
          in seconds)
        example: 1704067200
      last_updated_at:
        type: integer
        description: Filter by interactions last updated on or after this date (Unix
          timestamp in seconds)
        example: 1704067200
  CreateBbcrmInteraction:
    type: object
    required:
    - external_id
    - date_of_interaction
    - gift_officer_contact_method
    - primary_person_external_id
    - primary_gift_officer
    properties:
      external_id:
        type: string
        description: Unique identifier for the interaction in BBCRM
        example: INT-2024-001
      title:
        type: string
        description: Title of the interaction
        example: Phone call with donor
      content:
        type: string
        description: Detailed notes or content of the interaction
        example: Discussed upcoming campaign and potential major gift
      date_of_interaction:
        type: integer
        description: Date of the interaction (Unix timestamp in seconds)
        example: 1704067200
      is_significant:
        type: boolean
        description: Whether this is a significant interaction
        example: true
      primary_person_external_id:
        type: string
        description: External ID of the primary constituent
        example: CONST-001
      participant_people_external_ids:
        type: array
        items:
          type: string
        description: External IDs of additional participants
        example:
        - CONST-002
        - CONST-003
      gift_officer_contact_method:
        type: string
        description: Must match the name of one of the configured contact methods
          in GiveCampus
        example: Phone
      primary_gift_officer:
        type: object
        required:
        - external_id
        properties:
          external_id:
            type: string
            description: External ID of the primary gift officer
            example: GO-001
          email:
            type: string
            description: Email of the gift officer (alternative lookup)
            example: giftofficer@school.edu
          team:
            type: string
            description: Gift officer role/team name
            example: Major Gifts
      secondary_gift_officers:
        type: array
        items:
          type: object
          properties:
            external_id:
              type: string
              example: GO-002
            email:
              type: string
              example: assistant@school.edu
            team:
              type: string
              example: Annual Fund
      solicitation_plan:
        type: object
        description: Link this interaction to a solicitation plan
        properties:
          external_id:
            type: string
            description: External ID of the solicitation plan
            example: PLAN-001
      linked_task:
        type: object
        description: Task information linked to this interaction. See STATE Mappings
          in the description for supported state values.
        properties:
          stage:
            type: string
            description: Gift officer stage name for the task
            example: Cultivation
          state:
            type: string
            description: 'Task state. Supported values: canceled, cancelled, completed,
              declined, dismissed, pending, planned, postponed, upcoming'
            example: pending
      custom_field_boolean_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Interested in volunteering
            value:
              type: boolean
              example: true
      custom_field_date_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Follow-up date
            value:
              type: integer
              example: 1735689600
              description: Unix timestamp in seconds
      custom_field_float_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Estimated donation amount
            value:
              type: number
              format: float
              example: 100.5
      custom_field_selected_list_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Preferred contact method
            value:
              type: string
              example: Email
      custom_field_string_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Notes
            value:
              type: string
              example: Discussed upcoming events and fundraising goals
  UpdateBbcrmInteraction:
    type: object
    required:
    - external_id
    - date_of_interaction
    - gift_officer_contact_method
    - primary_person_external_id
    - primary_gift_officer
    properties:
      external_id:
        type: string
        description: Must match an existing BBCRM interaction's external ID
        example: INT-2024-001
      title:
        type: string
        description: Title of the interaction
        example: Phone call with donor
      content:
        type: string
        description: Detailed notes or content of the interaction
        example: Discussed upcoming campaign and potential major gift
      date_of_interaction:
        type: integer
        description: Date of the interaction (Unix timestamp in seconds)
        example: 1704067200
      is_significant:
        type: boolean
        description: Whether this is a significant interaction
        example: true
      primary_person_external_id:
        type: string
        description: External ID of the primary constituent
        example: CONST-001
      participant_people_external_ids:
        type: array
        items:
          type: string
        description: External IDs of additional participants
        example:
        - CONST-002
        - CONST-003
      gift_officer_contact_method:
        type: string
        description: Must match the name of one of the configured contact methods
          in GiveCampus
        example: Phone
      primary_gift_officer:
        type: object
        required:
        - external_id
        properties:
          external_id:
            type: string
            description: External ID of the primary gift officer
            example: GO-001
          email:
            type: string
            description: Email of the gift officer (alternative lookup)
            example: giftofficer@school.edu
          team:
            type: string
            description: Gift officer role/team name
            example: Major Gifts
      secondary_gift_officers:
        type: array
        items:
          type: object
          properties:
            external_id:
              type: string
              example: GO-002
            email:
              type: string
              example: assistant@school.edu
            team:
              type: string
              example: Annual Fund
      solicitation_plan:
        type: object
        description: Link this interaction to a solicitation plan
        properties:
          external_id:
            type: string
            description: External ID of the solicitation plan
            example: PLAN-001
      linked_task:
        type: object
        description: Task information linked to this interaction. See STATE Mappings
          in the description for supported state values.
        properties:
          stage:
            type: string
            description: Gift officer stage name for the task
            example: Cultivation
          state:
            type: string
            description: 'Task state. Supported values: canceled, cancelled, completed,
              declined, dismissed, pending, planned, postponed, upcoming'
            example: pending
      custom_field_boolean_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Interested in volunteering
            value:
              type: boolean
              example: true
      custom_field_date_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Follow-up date
            value:
              type: integer
              example: 1735689600
              description: Unix timestamp in seconds
      custom_field_float_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Estimated donation amount
            value:
              type: number
              format: float
              example: 100.5
      custom_field_selected_list_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Preferred contact method
            value:
              type: string
              example: Email
      custom_field_string_values:
        type: array
        items:
          type: object
          properties:
            custom_field_label:
              type: string
              example: Notes
            value:
              type: string
              example: Discussed upcoming events and fundraising goals
  BbcrmInteraction:
    type: object
    description: Response object returned when retrieving BBCRM interactions via search
      results download
    properties:
      id:
        type: integer
      external_id:
        type: string
      title:
        type: string
      is_significant:
        type: string
        description: '"Yes", "No", or null (for standalone tasks)'
      content:
        type: string
      date_of_interaction:
        type: integer
        description: Unix timestamp in seconds. Null for standalone tasks.
      primary_person:
        type: object
        properties:
          id:
            type: integer
          constituent_id:
            type: string
      participant_people:
        type: array
        items:
          type: object
          properties:
            id:
              type: integer
            constituent_id:
              type: string
      primary_gift_officer:
        type: object
        properties:
          solicitor_type:
            type: string
          solicitor_id:
            type: string
          team:
            type: string
      secondary_gift_officers:
        type: array
        items:
          type: object
          properties:
            solicitor_type:
              type: string
            solicitor_id:
              type: string
            team:
              type: string
      contact_method:
        type: object
        properties:
          name:
            type: string
          selectable:
            type: string
            description: '"Yes" or "No"'
          created_at:
            type: integer
            description: Unix timestamp in seconds
          updated_at:
            type: integer
            description: Unix timestamp in seconds
      custom_fields:
        type: array
        items:
          type: object
          properties:
            name:
              type: string
            type:
              type: string
            value:
              type: string
      creation_source:
        type: string
      solicitation_plan:
        type: object
        properties:
          id:
            type: integer
          external_id:
            type: string
      linked_task:
        type: object
        properties:
          stage:
            type: string
          state:
            type: string
          due_date:
            type: integer
            description: Unix timestamp in seconds
          original_due_date:
            type: integer
            description: Unix timestamp in seconds
          finished_at:
            type: integer
            description: Unix timestamp in seconds
          task_type:
            type: string
          cadence:
            type: object
            properties:
              name:
                type: string
              step_name:
                type: string
              step_type:
                type: string
          trip:
            type: object
            properties:
              title:
                type: string
              visit_title:
                type: string
      created_at:
        type: integer
        description: Unix timestamp in seconds
      updated_at:
        type: integer
        description: Unix timestamp in seconds
  ApiRequest:
    type: object
    properties:
      request_id:
        type: string
        example: abc123
      state:
        type: string
        example: processing
  ApiResults:
    type: object
    properties:
      request_id:
        type: string
      state:
        type: string
        enum:
        - pending
        - processing
        - completed
        - failed
      download_url:
        type: string
        example: https://givecampus.com/api/downloads/request_id.csv
