Person

This document defines the Person resource.

People are individual users who are stored in the OSDI system’s database in some way.

People have names, email addresses, and other information, and they have associated action histories recording the actions they’ve taken on the system, such as a list of their signatures on various petitions.

Sections:

Endpoints and URL structures

OSDI does not specify specific endpoints and link structures for compliant systems to use. Rather, because OSDI is a HAL+JSON API, endpoints and structures are defined in the links section of each returned resource, starting with the API Entry Point link.

HAL’s link structure lets an API consumer move through API levels, resources, and collections by parsing and following links. While most systems will not change the value of their links often and obey RESTful design principles, the value of each link when that resource is retrieved is the only canonical value, and it can change at any time.

The link relation label for a Person resource is osdi:person for a single Person resource or osdi:people for a collection of Person resources.

Back to top…

Fields

The field names for this resource, with standard names, punctuation and capitalization, and values where appropriate.

Note: As with the entire OSDI specification, the specific fields a compliant system implements will vary between each system, as will the fields each system requires when creating or updating resources, which fields are writeable, and the operations you are allowed to perform on each resource.

Common Fields

A set of common fields that appear on all resources is included first, for reference.

Name Type Description
identifiers strings[] A unique string array of identifiers in the format [system name]:[id]. See the general concepts document for more information about identifiers.
created_date datetime A read-only property representing the date and time the resource was created on the local system.
modified_date datetime A read-only property representing the date and time the resource was last modified on the local system.

Control Headers

An “osdi:control” JSON object may contain common OSDI control headers which can be used on an OSDI POST, PUT, PATCH, Helper or other function calls to modify server behavior. Read More

Name Type Description
return_response boolean Defaults to true, if specified as false, the operation does not need to return the resource representation in the response

Back to top…

People Fields

A list of fields specific to the Person resource.

Name Type Description
family_name string The person’s last name.
given_name string The person’s first name.
additional_name string An additional name not included in family or given. Usually a middle name.
honorific_prefix string An honorific prefix like “Dr”, “Mr”, “Mx” etc…
honorific_suffix string An honorific suffix like “Jr.”, “Ph.D”, etc…
gender enum The gender binary with which a person most closely identifies, or “Other” if the person identifies with neither. One of “Female”, “Male”, or “Other”.
gender_identity string The self-described gender with which a person identifies. While this field is free-form, data should still follow standardized forms whenever possible (i.e. use “Female” and not “female” or “F”). Examples: If a person self-identifies as “Female”, both gender and gender_identity fields should have a value of “Female”. If a person self-identifies as “Transgender Female”, gender should have a value of “Female” and gender_identity should have a value of “Transgender Female”.
additional_gender_identities string[] An array of gender identities
gender_pronouns Gender Pronouns An object hash representing the persons desired gender pronouns
party_identification flexenum Flexenum describing the person’s politcal party identification. One of “None”, “Democratic”, “Republican”, “Independent”, or another free-form string.
parties Parties[] An array of all party object hashes associated with the person (past and present).
source string Information about the source where this person record was acquired. Example: “facebook-ad-october”
ethnicities strings[] A unique string array representing a person’s ethnicities.
languages_spoken strings[] Unique string array of RFC5646 tags representing the languages spoken by the person. Example: en, en-US, fr-CA, pt-BR
preferred_language string The RFC5646 tag representing the person’s preferred language.
browser_url string A URL string pointing to the publicly available person page on the web, such as a public profile page.
administrative_url string A URL string pointing to the person’s administrative page on the web, such as a page for managing this person’s record.
birthdate Birthdate An object hash representing the birthdate of the person.
employer string The name of the person’s employer.
work_title string The person’s job title at work, eg ‘Developer’, ‘Field Director’, ‘Minion’
work_department string The department the person works in, eg ‘Engineering’, ‘OSDI Fire Department’
employer_address Employer Address An object hash representing the postal address of the person’s employer.
postal_addresses Postal Addresses[] An array of postal address object hashes associated with the person.
email_addresses Email Addresses[] An array of email address object hashes associated with the person.
phone_numbers Phone Numbers[] An array of phone number object hashes associated with the person.
profiles Profiles[] An array of profile object hashes for online services related to the person.
custom_fields Custom Fields An object hash of key/value pairs associated with the person created by a user rather than a service or vendor.
division_info DivisionInfo[] An array of DivisionInfo objects representing related political geographies such as a state, county, or congressional district.

Back to top…

These JSON hashes included in the table above are broken out into their own tables for readability, rather than independent resources with their own endpoints.

Birthdate

Name Type Description
birthdate.month integer An integer representing the month of the birth date of the person.
birthdate.day integer An integer representing the day of the birth date of the person.
birthdate.year integer An integer representing the 4 digit year of the birth date of the person.

Parties

Name Type Description
parties.identification flexenum One of “None”, “Democratic”, “Republican”, “Independent”, or another free-form string.
parties.last_verified_date datetime A value representing the last verified date of the party registration.
parties.active boolean Whether or not this party registration is active for the affiliated person.

Employer Address

Name Type Description
employer_address.venue string Optional venue name at the employer address, useful for names of buildings. (ex: Smith Hall)
employer_address.address_lines strings[] An array of strings representing the employer’s street address.
employer_address.locality string A city or other local administrative area.
employer_address.region string State or subdivision codes according to ISO 3166-2 (Final 2 alpha digits).
employer_address.postal_code string The region specific postal code, such as a zip code.
employer_address.country string The country code according to ISO 3166-1 Alpha-2.
employer_address.language string Language in which the address is recorded – language code according to ISO 639.
employer_address.location object An object hash representing the geocoded location information for the address.
employer_address.location.latitude float A positive or negative float number representing the latitude of the address.
employer_address.location.longitude float A positive or negative float number representing the longitude of the address.
employer_address.location.accuracy enum A value representing the accuracy of the geocode. One of “Rooftop” or “Approximate”.
employer_address.status enum A value representing the status of the address. One of “Potential”, “Verified”, or “Bad”.

Postal Addresses

Name Type Description
postal_addresses.primary boolean Denotes if this is the primary address. A person can have only one primary address.
postal_addresses.address_type enum The type of address. One of “Home”, “Work”, or “Mailing”.
postal_addresses.venue string Optional venue name at the address, useful for names of buildings. (ex: Smith Hall)
postal_addresses.address_lines strings[] An array of strings representing the person’s street address.
postal_addresses.locality string A city or other local administrative area.
postal_addresses.region string State or subdivision codes according to ISO 3166-2 (Final 2 alpha digits).
postal_addresses.postal_code string The region specific postal code, such as a zip code.
postal_addresses.country string The country code according to ISO 3166-1 Alpha-2.
postal_addresses.language string Language in which the address is recorded – language code according to ISO 639.
postal_addresses.location object An object hash representing the geocoded location information for the address.
postal_addresses.location.latitude float A positive or negative float number representing the latitude of the address.
postal_addresses.location.longitude float A positive or negative float number representing the longitude of the address.
postal_addresses.location.accuracy enum A value representing the accuracy of the geocode. One of “Rooftop” or “Approximate”.
postal_addresses.status enum A value representing the status of the address. One of “Potential”, “Verified”, “Bad”, or “Past”.
postal_addresses.last_verified_date datetime A value representing the last verified date of the address.
occupation string The occupation of the person.

Email Addresses

Name Type Description
email_addresses.primary boolean Denotes if this is the primary address. A person can have only one primary address.
email_addresses.address string The email address for the person.
email_addresses.address_type flexenum The type of email address. One of “personal”, “work”, “other”, or another value.
email_addresses.status enum Indicates whether this email address is subscribed to receive emails in the system, either on one or more email lists. One of “subscribed”, “unsubscribed”, “bouncing”, “spam complaints”.

Phone Numbers

Name Type Description
phone_numbers.primary string Denotes if this is the primary phone number. A person can have only one primary number.
phone_numbers.number string The phone number of the person. Must including country code and must be numeric characters only.
phone_numbers.extension string An optional associated extension for the number.
phone_numbers.description string A freeform description of the phone number.
phone_numbers.number_type flexenum The type of phone number. One of “Home”, “Work”, “Mobile”, “Other”, “Daytime”, “Evening”, “Fax”, or another value.
phone_numbers.operator string The operator or carrier associated with the number. Example: “Verizon”
phone_numbers.country string The country code according to ISO 3166-1 Alpha-2.
phone_numbers.sms_capable boolean True if the number can accept SMS text messages.
phone_numbers.do_not_call boolean True if this number is registered on the US FCC Do Not Call Registry.

Profiles

Name Type Description
profiles.provider string The provider name of the profile. Example: “Facebook”
profiles.id string The unique identifier provided by the provider for the profile. Example: “135165”
profiles.url string The URL to the person’s web viewable profile. Example: “http://facebook.com/john.doe”
profiles.handle string The handle name of the profile. Twitter handles should not include the “@” Example: “johndoe”

Custom Fields

Name Type Description
custom_fields.[key] string The key associated with this custom field, with a corresponding value as a string. May be prefixed by servers based on naming conventions they document to control how collisions across systems and data sets occur.

Gender Pronouns

Gender pronouns are used to capture how a person chooses to be identified and to provide machine readable terms to use in scenarios like status updates.

Example Scenarios
  • Alice completed her phone banking shift
  • Bob updated his avatar
  • Furiegh confirmed their attendance
Gender Pronouns Object Fields
Name Type Description
subject flexenum A string representing the subject (nominative) pronoun. One of “She”, “He”, “They” or another value
object flexenum A string representing the object (oblique) pronoun. One of “Her”, “Him”, “Them” or another value
posessive flexenum A string representing the posessive pronoun. One of “Hers”, “His”, “Theirs” or another value

Terminology for the types of pronouns taken from Wikipedia: https://en.wikipedia.org/wiki/Third-person_pronoun#Summary

Divisions

Divisions, aka Districts A political geography such as a state, county, or congressional district.

Division Info
Name Type Description
id string Identifier for a division type
name string Textual name of a division type
divisions Division[] Array of Division obects for each district related to the resource
Division
Name Type Description
id string Identifier for division
name string Textual name of a division
ocd_id string String representing Open Civic Data ID

Back to top…

The links associated with this resource, available in the links section of the resource. Links that are part of the OSDI spec are typically prefixed with the osdi: namespace to aid in curie matching and readability.

Note: As with the entire OSDI specification, the specific links a compliant system supplies will vary between each system. In addition, systems may choose to embed a linked resource directly in the response in addition to linking to it in the links section, using the standard _embedded syntax described in the general overview documentation.

Name Type Description
self Person* A self-referential link to the person.
donations Donations[]* A link to the collection of donations associated with the person.
submissions Submissions[]* A link to the collection of form submissions associated with the person.
attendances Attendances[]* A link to the collection of event attendances associated with the person.
signatures Signatures[]* A link to the collection of petition signatures associated with the person.
outreaches Outreaches[]* A link to the collection of advocacy campaign outreaches associated with the person.
answers Answers[]* A link to the collection of answers to questions associated with the person.
taggings Taggings[]* A link to the collection of taggings associated with the person.
items Items[]* A link to the collection of list items associated with the person.
modified_by Person* A link to a Person resource representing the last editor of this person.
record_canvas_helper Record Canvass Helper* A link to the Record Canvass Helper for this person.

Back to top…

Helpers

Helpers faciliate combined creation operations (POST) that are commonly performed by users. Each resource may have one or more associated helpers, which perform different operations and have separate syntax. Some initial OSDI implementations may only support helpers, rather than full RESTful access.

The helpers that operate on this resource are described in the table below. Click on the helper to view its documentation and syntax.

Name Description
person_signup_helper Allows the creation of a person and associated tag and list membership.

Back to top…

Back to top…

Scenarios

The scenarios below show some common Create, Read, Update, Delete (CRUD) operations that can be performed on this resource, as well as any resource-specific behaviors worth highlighting. The following examples are for informational purposes. The authoritative resource definitions are above in the Fields tables and should be followed in the event of a conflict with the examples.

Scenario: Retrieving a collection of Person resources (GET)

Person resources are sometimes presented as collections of people. For example, calling the people endpoint will return a collection of all the people stored in the system’s database associated with your api key.

Request

GET https://osdi-sample-system.org/api/v1/people/

Header:
OSDI-API-Token:[your api key here]

Response

200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate

{
    "total_pages": 88,
    "per_page": 25,
    "page": 1,
    "total_records": 2188,
    "_links": {
        "next": {
            "href": "https://osdi-sample-system.org/api/v1/people?page=2"
        },
        "osdi:people": [
            {
                "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3"
            },
            {
                "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e"
            },
            //(truncated for brevity)
        ],
        "curies": [
            {
                "name": "osdi",
                "href": "https://osdi-sample-system.org/docs/v1/{rel}",
                "templated": true
            }
        ],
        "self": {
            "href": "https://osdi-sample-system.org/api/v1/people"
        }
    },
    "_embedded": {
        "osdi:people": [
            {
                "identifiers": [
                    "osdi_sample_system:d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
                    "foreign_system:1"
                ],
                "origin_system": "OSDI Sample System",
                "created_date": "2014-03-20T21:04:31Z",
                "modified_date": "2014-03-20T21:04:31Z",
                "given_name": "John",
                "family_name": "Smith",
                "honorific_prefix": "Mx.",
                "honorific_suffix": "Ph.D",
                "additional_name": "Scott",
                "gender": "Male",
                "gender_identity": "Transgender Male",
                "gender_pronouns": {
                    "subject": "They",
                    "object": "Them",
                    "posessive": "Theirs"
                },
                "party_identification": "Democratic",
                "parties": [
                  {
                     "identification": "Democratic",
                     "last_verified_date": "2014-03-20T21:04:31Z",
                     "active": true
                  }
                ],
                "division_info" : [
                  {
                    "name": "State",
                    "divisions": [
                      {
                        "id": "OH",
                        "name": "Ohio",
                        "ocd_id": "ocd-division/country:us/state:oh"
                      }
                
                    ]
                  },
                  {
                    "name": "Congressional",
                    "divisions": [
                      {
                        "id": "012",
                        "name": "Ohio 12th Congressional District",
                        "ocd_id": "ocd-division/country:us/state:oh/cd:12"
                      }
                
                    ]
                  }
                ],
   
                "source": "october_canvass",
                "browser_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
                "administrative_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
                "birthdate": {
                    "month": 6,
                    "day": 2,
                    "year": 1973
                },
                "ethnicities": [
                    "African American"
                ],
                "languages_spoken": [
                    "en-US",
                    "fr-CA"
                ],
                "preferred_language": "fr-CA",
                "employer": "Acme Corp",
                "employer_address": {
                    "venue": "Bull Hall",
                    "address_lines": [
                        "123 Acme Street",
                        "Suite 400"
                    ],
                    "locality": "New Yorkhaven",
                    "region": "NY",
                    "postal_code": "10001",
                    "country": "US",
                    "language": "en",
                    "location": {
                        "latitude": 38.9382,
                        "longitude": -77.3349,
                        "accuracy": "Rooftop"
                    },
                    "status": "Verified"
                },
                "occupation": "Accountant",
                "postal_addresses": [
                    {
                        "primary": true,
                        "address_type": "Home",
                        "address_lines": [
                            "1900 Pennsylvania Ave"
                        ],
                        "locality": "Washington",
                        "region": "DC",
                        "postal_code": "20009",
                        "country": "US",
                        "language": "en",
                        "location": {
                            "latitude": 38.919,
                            "longitude": -77.0379,
                            "accuracy": "Rooftop"
                        },
                        "last_verified_date": "2014-03-20T21:04:31Z"
                    }
                ],
                "email_addresses": [
                    {
                        "primary": true,
                        "address": "johnsmith@mail.com",
                        "address_type": "Personal",
                        "status": "subscribed"
                    }
                ],
                "phone_numbers": [
                    {
                        "primary": true,
                        "number": "11234567890",
                        "extension": "432",
                        "description": "Worksite line",
                        "number_type": "Work",
                        "operator": "ATT",
                        "country": "US",
                        "sms_capable": false,
                        "do_not_call": true
                    }
                ],
                "profiles": [
                    {
                        "provider": "Facebook",
                        "id": "john.doe.1234",
                        "url": "https://facebook.com/john.doe"
                    },
                    {
                        "provider": "Twitter",
                        "id": "eds34d8j2kddfd45",
                        "url": "https://twitter.com/johndoe",
                        "handle": "johndoe"
                    }
                ],
                "custom_fields": {
                    "is_volunteer": "true",
                    "most_important_issue": "Equal pay",
                    "union_member": "true"
                },
                "_links": {
                    "self": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3"
                    },
                    "osdi:answers": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/answers"
                    },
                    "osdi:attendance": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/attendance"
                    },
                    "osdi:signatures": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/signatures"
                    },
                    "osdi:submissions": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/submissions"
                    },
                    "osdi:donations": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/donations"
                    },
                    "osdi:outreaches": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/outreaches"
                    },
                    "osdi:taggings": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/taggings"
                    },
                    "osdi:items": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/items"
                    },
                    "osdi:record_canvass_helper": {
                        "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/record_canvass_helper"
                    }
                }
            },
            {
                "given_name": "Jane",
                "family_name": "Doe",
                "identifiers": [
                    "osdi_sample_system:1efc3644-af25-4253-90b8-a0baf12dbd1e"
                ],
                "origin_system": "OSDI Sample System",
                "created_date": "2014-03-20T20:44:13Z",
                "modified_date": "2014-03-20T20:44:13Z",
                "browser_url": "http://osdi-sample-system.org/people/1efc3644-af25-4253-90b8-a0baf12dbd1e",
                "administrative_url": "http://osdi-sample-system.org/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/manage",
                "email_addresses": [
                    {
                        "primary": true,
                        "address": "janedoe@mail.com",
                        "status": "unsubscribed"
                    }
                ],
                "postal_addresses": [
                    {
                        "primary": true,
                        "locality": "Washington",
                        "region": "DC",
                        "postal_code": "20009",
                        "country": "US",
                        "language": "en",
                        "location": {
                            "latitude": 38.919,
                            "longitude": -77.0379,
                            "accuracy": "Approximate"
                        }
                    }
                ],
                "gender_pronouns": {
                    "subject": "She",
                    "object": "Her",
                    "posessive": "Hers"
                },
                "_links": {
                    "self": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e"
                    },
                    "osdi:answers": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/answers"
                    },
                    "osdi:attendance": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/attendance"
                    },
                    "osdi:signatures": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/signatures"
                    },
                    "osdi:submissions": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/submissions"
                    },
                    "osdi:donations": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/donations"
                    },
                    "osdi:outreaches": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/outreaches"
                    },
                    "osdi:taggings": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/taggings"
                    },
                    "osdi:items": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/items"
                    },
                    "osdi:record_canvass_helper": {
                        "href": "https://osdi-sample-system.org/api/v1/people/1efc3644-af25-4253-90b8-a0baf12dbd1e/record_canvass_helper"
                    }
                }
            },
            //(truncated for brevity)
        ]
    }
}

Back to top…

Scenario: Scenario: Retrieving an individual Person resource (GET)

Calling an individual Person resource will return the resource directly, along with all associated fields and appropriate links to additional information about the person.

Request

GET https://osdi-sample-system.org/api/v1/people/d32fcdd6-7366-466d-a3b8-7e0d87c3cd8b

Header:
OSDI-API-Token:[your api key here]

Response

200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate

{
    "identifiers": [
        "osdi_sample_system:d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
        "foreign_system:1"
    ],
    "origin_system": "OSDI Sample System",
    "created_date": "2014-03-20T21:04:31Z",
    "modified_date": "2014-03-20T21:04:31Z",
    "given_name": "John",
    "family_name": "Smith",
    "honorific_prefix": "Mr.",
    "honorific_suffix": "Ph.D",
    "additional_name": "Scott",
    "gender": "Male",
    "gender_identity": "Male",
    "party_identification": "Democratic",
    "parties": [
      {
        "identification": "Democratic",
        "last_verified_date": "2014-03-20T21:04:31Z",
        "active": true
      }
    ],
    "source": "october_canvass",
    "browser_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
    "administrative_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
    "birthdate": {
        "month": 6,
        "day": 2,
        "year": 1973
    },
    "ethnicities": [
        "African American"
    ],
    "languages_spoken": [
        "en",
        "fr"
    ],
    "employer": "Acme Corp",
    "employer_address": {
        "venue": "Bull Hall",
        "address_lines": [
            "123 Acme Street",
            "Suite 400"
        ],
        "locality": "New Yorkhaven",
        "region": "NY",
        "postal_code": "10001",
        "country": "US",
        "language": "en",
        "location": {
            "latitude": 38.9382,
            "longitude": -77.3349,
            "accuracy": "Rooftop"
        },
        "status": "Verified"
    },
    "occupation": "Accountant",
    "postal_addresses": [
        {
            "primary": true,
            "address_type": "Home",
            "address_lines": [
                "1900 Pennsylvania Ave"
            ],
            "locality": "Washington",
            "region": "DC",
            "postal_code": "20009",
            "country": "US",
            "language": "en",
            "location": {
                "latitude": 38.919,
                "longitude": -77.0379,
                "accuracy": "Rooftop"
            }
        }
    ],
    "email_addresses": [
        {
            "primary": true,
            "address": "johnsmith@mail.com",
            "address_type": "personal",
            "status": "subscribed"
        }
    ],
    "phone_numbers": [
        {
            "primary": true,
            "number": "11234567890",
            "extension": "432",
            "description": "Worksite line",
            "number_type": "Work",
            "operator": "ATT",
            "country": "US",
            "sms_capable": false,
            "do_not_call": true
        }
    ],
    "profiles": [
        {
            "provider": "Facebook",
            "id": "john.doe.1234",
            "url": "https://facebook.com/john.doe"
        },
        {
            "provider": "Twitter",
            "id": "eds34d8j2kddfd45",
            "url": "https://twitter.com/johndoe",
            "handle": "johndoe"
        }
    ],
    "custom_fields": {
        "is_volunteer": "true",
        "most_important_issue": "Equal pay",
        "union_member": "true"
    },
    "gender_pronouns": {
                    "subject": "They",
                    "object": "Them",
                    "posessive": "Theirs"
    },      
    "_links": {
        "self": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3"
        },
        "osdi:answers": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/answers"
        },
        "osdi:attendance": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/attendance"
        },
        "osdi:signatures": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/signatures"
        },
        "osdi:submissions": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/submissions"
        },
        "osdi:donations": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/donations"
        },
        "osdi:outreaches": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/outreaches"
        },
        "osdi:taggings": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/taggings"
        },
        "osdi:items": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/items"
        },
        "osdi:record_canvass_helper": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/record_canvass_helper"
        }
    }
}

Back to top…

Scenario: Creating a new person (POST)

Posting to the people collection endpoint will allow you to create a new person. The response is the new person that was created. While each implementing system will require different fields, any optional fields not included in a post operation should not be set at all by the receiving system, or should be set to default values.

For information on how to link a person with tags and list subscription information in one post, see the Person Signup Helper documentation.

Request

POST https://osdi-sample-system.org/api/v1/people/

Header:
OSDI-API-Token:[your api key here]

{
    "identifiers": [
        "foreign_system:1"
    ],
    "family_name": "Edwin",
    "given_name": "Labadie",
    "additional_name": "Marques",
    "origin_system": "OpenSupporter",
    "email_addresses": [
        {
            "address":"test-3@example.com",
            "primary": true,
            "address_type": "personal",
            "status": "subscribed"
        }
    ],
    "postal_addresses": [
        {
            "primary": true,
            "address_lines": [
                "935 Ed Lock"
            ],
            "locality": "New Dudley",
            "region": "MN",
            "postal_code": "17678",
            "country": "RU",
            "address_type": "Home",
            "status": "Verified"
        }
    ],
    "phone_numbers": [
        {
            "primary": true,
            "number": 19876543210,
            "number_type": "Mobile",
            "sms_capable": true
        }
    ],
    "gender": "Male",
    "gender_pronouns": {
                    "subject": "They",
                    "object": "Them",
                    "posessive": "Theirs"
    }
}

Response

200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate

{
    "identifiers": [
        "osdi_sample_system:d91b4b2e-ae0e-4cd3-9ed7-de9uemdse",
        "foreign_system:1"
    ],
    "created_date": "2014-03-20T21:04:31Z",
    "modified_date": "2014-03-20T21:04:31Z",
    "family_name": "Edwin",
    "given_name": "Labadie",
    "additional_name": "Marques",
    "origin_system": "OpenSupporter",
    "browser_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
    "administrative_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
    "email_addresses": [
        {
            "address":"test-3@example.com",
            "primary": true,
            "address_type": "personal",
            "status": "subscribed"
        }
    ],
    "postal_addresses": [
        {
            "primary": true,
            "address_lines": [
                "935 Ed Lock"
            ],
            "locality": "New Dudley",
            "region": "MN",
            "postal_code": "17678",
            "country": "RU",
            "address_type": "Home",
            "status": "Verified"
        }
    ],
    "phone_numbers": [
        {
            "primary": true,
            "number": 19876543210,
            "number_type": "Mobile",
            "sms_capable": true
        }
    ],
    "gender": "Male",
    "_links": {
        "self": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse"
        },
        "osdi:answers": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/answers"
        },
        "osdi:attendance": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/attendance"
        },
        "osdi:signatures": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/signatures"
        },
        "osdi:submissions": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/submissions"
        },
        "osdi:donations": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/donations"
        },
        "osdi:outreaches": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/outreaches"
        },
        "osdi:taggings": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/taggings"
        },
        "osdi:items": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/items"
        },
        "osdi:record_canvass_helper": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/record_canvass_helper"
        }
    }
}

Back to top…

Scenario: Modifying a person (PUT)

You can update a person by calling a PUT operation on that person’s endpoint. Your PUT should contain fields that you want to update. Missing fields will be ignored by the receiving system. Systems may also ignore PUT values, depending on whether fields you are trying to modify are read-only or not. You may set an attribute to nil by including the attribute using nil for value.

Note: Modifying members of an array separately is not supported. To change the contents of an array, first GET the current contents and then PUT back only those you wish to keep.

Request

PUT https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse

Header:
OSDI-API-Token:[your api key here]

{
    "family_name": "Ed",
    "email_addresses": [
        {
            "address":"test-new@example.com",
            "primary": true,
            "address_type": "personal"
        }
    ]
}

Response

200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate

{
    "identifiers": [
        "osdi_sample_system:d91b4b2e-ae0e-4cd3-9ed7-de9uemdse",
        "foreign_system:1"
    ],
    "created_date": "2014-03-20T21:04:31Z",
    "modified_date": "2014-03-20T22:04:31Z",
    "family_name": "Ed",
    "given_name": "Labadie",
    "additional_name": "Marques",
    "origin_system": "OpenSupporter",
    "browser_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
    "administrative_url": "http://osdi-sample-system.org/people/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
    "email_addresses": [
        {
            "address":"test-new@example.com",
            "primary": true,
            "address_type": "personal",
            "status": "subscribed"
        }
    ],
    "postal_addresses": [
        {
            "primary": true,
            "address_lines": [
                "935 Ed Lock"
            ],
            "locality": "New Dudley",
            "region": "MN",
            "postal_code": "17678",
            "country": "RU",
            "address_type": "Home",
            "status": "Verified"
        }
    ],
    "phone_numbers": [
        {
            "primary": true,
            "number": 19876543210,
            "number_type": "Mobile",
            "sms_capable": true
        }
    ],
    "gender": "Male",
    "_links": {
        "self": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse"
        },
        "osdi:answers": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/answers"
        },
        "osdi:attendance": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/attendance"
        },
        "osdi:signatures": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/signatures"
        },
        "osdi:submissions": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/submissions"
        },
        "osdi:donations": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/donations"
        },
        "osdi:outreaches": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/outreaches"
        },
        "osdi:taggings": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/taggings"
        },
        "osdi:items": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/items"
        },
        "osdi:record_canvass_helper": {
            "href": "https://osdi-sample-system.org/api/v1/people/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/record_canvass_helper"
        }
    }
}

Back to top…

Scenario: Deleting a person (DELETE)

You may delete a person by calling the DELETE command on the person’s endpoint.

Request

DELETE https://osdi-sample-system.org/api/v1/people/d32fcdd6-7366-466d-a3b8-7e0d87c3cd8b

Header:
OSDI-API-Token:[your api key here]

Response

200 OK

Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate

{
    "notice": "This person was successfully deleted."
}

Back to top…