Organization (experimental)

Experimental areas of the specification are published to illustrate the design direction, allow implementers to prototype, while taking additional feedback.

This document defines the Organization resource.

Organizations are political/legal entities that generally organize a group of people that are stored in the OSDI system’s database in some way.

The Organization resource is as similar as possible to the Person* resource, removing some fields that only apply to people (e.g. family name, gender identity, etc) and adding others like legal status and logo. However, the similarities are much greater. Organizations have email and postal addresses, facebook and twitter pages, etc. Many systems will store Organizations and People in the same database table and separate them by a type field or otherwise.

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:organization for a single Organization resource or osdi:organizations for a collection of Organization 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.

Back to top…

Organization Fields

A list of fields specific to the Organization resource. A few things are purposefully distinct from Person and other objects. For instance, organization for the organization’s name is unique so an organization resource is easily distinguishable from other resource types.

Name Type Description
organization string The organization’s human-readable common name. This may not be a full name, if the organization, for instance mostly goes by an acronym – it should be the value that would be in a listing for the organization and in prose.
legal_status flexenum The organization’s legal status, or “unofficial” if the organization does not have a corresponding legal entity. Common values will be “llc”, “sole prop”, “c3”, “c4”, and “pac”.
logo_image_url string A URL string pointing to a publicly available image file of the organization’s logo. It should be a format supported in the <img> html tag.
site_url string A URL pointing to the organization’s own public homepage. Whereas browser_url (below) may be to a local page contextual to the system, site_url should always be the organization’s own site.
summary string A short one-line description of the organization. If the organization key contains an acronym, this would be where you include the full name.
description string A longer description of the organization, possibly contextual to the origin_system the record comes from.

Back to top…

Common to Person Fields

A list of fields common to the Person resource. These fields are preserved in both so processing data can largely be the same for each. Some of these fields have different connotations in the Organization resource. For instance party_identification and languages_spoken are more about the official support/affiliation from the organization rather than about the total or average of all the organization’s members.

Name Type Description
party_identification flexenum Flexenum describing the organization’s politcal party identification. One of “None”, “Democratic”, “Republican”, etc. Note that this is not about the organization’s political ‘tilt’ but only if it has direct association with the political party
source string Information about the source where this organization record was acquired. Example: “facebook-ad-october”
languages_spoken strings[] Unique string array of RFC5646 tags representing the languages spoken by the organization. Example: en, en-US, fr-CA, pt-BR
browser_url string A URL string pointing to the publicly available organization page on the web, such as a public profile page.
administrative_url string A URL string pointing to the organization’s administrative page on the web, such as a page for managing this organization’s record.
postal_addresses Postal Addresses[] An array of postal address object hashes associated with the organization.
email_addresses Email Addresses[] An array of email address object hashes associated with the organization.
phone_numbers Phone Numbers[] An array of phone number object hashes associated with the organization.
profiles Profiles[] An array of profile object hashes for online services related to the organization.
custom_fields Custom Fields An object hash of key/value pairs associated with the organization created by a user rather than a service or vendor.

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.

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 organization’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.

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 Organization* A self-referential link to the organization.
events Events[]* A link to the collection of events the organization has sponsored.
petitions Petitions[]* A link to the collection of petitions the organization has sponsored.
donations Donations[]* A link to the collection of donations associated with the organization.
submissions Submissions[]* A link to the collection of form submissions associated with the organization.
attendances Attendances[]* A link to the collection of event attendances associated with the organization.
signatures Signatures[]* A link to the collection of petition signatures associated with the organization.
outreaches Outreaches[]* A link to the collection of advocacy campaign outreaches associated with the organization.
answers Answers[]* A link to the collection of answers to questions associated with the organization.
taggings Taggings[]* A link to the collection of taggings associated with the organization.
items Items[]* A link to the collection of list items associated with the organization.
modified_by Person* A link to a Person resource representing the last editor of this organization record.

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 Organization resources (GET)

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

Request

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

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/organizations?page=2"
        },
        "osdi:organizations": [
            {
                "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3"
            },
            {
                "href": "https://osdi-sample-system.org/api/v1/organizations/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/organizations"
        }
    },
    "_embedded": {
        "osdi:organizations": [
            {
                "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",
                "organization": "F.O.O.",
                "legal_status": "c3",
                "summary": "For Our Opinions - helping people who have opinions everywhere",
                "site_url": "https://foo.example/",
                "logo_image_url": "https://foo.example/images/200x200/logo.png",
                "source": "october_canvass",
                "browser_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
                "administrative_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
                "postal_addresses": [
                    {
                        "primary": true,
                        "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": "help@mail.com",
                        "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": {
                    "most_important_issue": "Equal pay"
                },
                "_links": {
                    "self": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3"
                    },
                    "osdi:answers": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/answers"
                    },
                    "osdi:attendance": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/attendance"
                    },
                    "osdi:signatures": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/signatures"
                    },
                    "osdi:submissions": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/submissions"
                    },
                    "osdi:donations": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/donations"
                    },
                    "osdi:outreaches": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/outreaches"
                    },
                    "osdi:taggings": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/taggings"
                    },
                    "osdi:items": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/items"
                    }
                }
            },
            {
                "organization": "Bars For Justice",
                "legal_status": "c4",
                "logo_image_url": "https://bar.example/images/logo.svg",
                "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/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e",
                "administrative_url": "http://osdi-sample-system.org/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/manage",
                "email_addresses": [
                    {
                        "primary": true,
                        "address": "support@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"
                        }
                    }
                ],
                "_links": {
                    "self": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e"
                    },
                    "osdi:answers": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/answers"
                    },
                    "osdi:attendance": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/attendance"
                    },
                    "osdi:signatures": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/signatures"
                    },
                    "osdi:submissions": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/submissions"
                    },
                    "osdi:donations": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/donations"
                    },
                    "osdi:outreaches": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/outreaches"
                    },
                    "osdi:taggings": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/taggings"
                    },
                    "osdi:items": {
                        "href": "https://osdi-sample-system.org/api/v1/organizations/1efc3644-af25-4253-90b8-a0baf12dbd1e/items"
                    }
                }
            },
            //(truncated for brevity)
        ]
    }
}

Back to top…

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

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

Request

GET https://osdi-sample-system.org/api/v1/organizations/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",
    "organization": "F.O.O.",
    "legal_status": "c3",
    "summary": "For Our Opinions - helping people who have opinions everywhere",
    "site_url": "https://foo.example/",
    "logo_image_url": "https://foo.example/images/200x200/logo.png",
    "source": "october_canvass",
    "browser_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
    "administrative_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
    "postal_addresses": [
        {
            "primary": true,
            "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": "help@mail.com",
            "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": {
        "most_important_issue": "Equal pay"
    },
    "_links": {
        "self": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3"
        },
        "osdi:answers": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/answers"
        },
        "osdi:attendance": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/attendance"
        },
        "osdi:signatures": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/signatures"
        },
        "osdi:submissions": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/submissions"
        },
        "osdi:donations": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/donations"
        },
        "osdi:outreaches": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/outreaches"
        },
        "osdi:taggings": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/taggings"
        },
        "osdi:items": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/items"
        }
    }
}

Back to top…

Scenario: Creating a new organization (POST)

Posting to the organizations collection endpoint will allow you to create a new organization. The response is the new organization 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.

Request

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

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

{
    "identifiers": [
        "foreign_system:1"
    ],
    "organization": "Labadabadoo",
    "origin_system": "OpenSupporter",
    "email_addresses": [
        {
            "address":"test-3@example.com",
            "primary": true,
            "status": "subscribed"
        }
    ],
    "postal_addresses": [
        {
            "primary": true,
            "address_lines": [
                "935 Ed Lock"
            ],
            "locality": "New Dudley",
            "region": "MN",
            "postal_code": "17678",
            "country": "RU",
            "status": "Verified"
        }
    ],
    "phone_numbers": [
        {
            "primary": true,
            "number": 19876543210,
            "number_type": "Mobile",
            "sms_capable": true
        }
    ]
}

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",
    "organization": "Labadabadoo",
    "origin_system": "OpenSupporter",
    "browser_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
    "administrative_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
    "email_addresses": [
        {
            "address":"test-3@example.com",
            "primary": true,
            "status": "subscribed"
        }
    ],
    "postal_addresses": [
        {
            "primary": true,
            "address_lines": [
                "935 Ed Lock"
            ],
            "locality": "New Dudley",
            "region": "MN",
            "postal_code": "17678",
            "country": "RU",
            "status": "Verified"
        }
    ],
    "phone_numbers": [
        {
            "primary": true,
            "number": 19876543210,
            "number_type": "Mobile",
            "sms_capable": true
        }
    ],
    "_links": {
        "self": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse"
        },
        "osdi:answers": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/answers"
        },
        "osdi:attendance": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/attendance"
        },
        "osdi:signatures": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/signatures"
        },
        "osdi:submissions": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/submissions"
        },
        "osdi:donations": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/donations"
        },
        "osdi:outreaches": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/outreaches"
        },
        "osdi:taggings": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/taggings"
        },
        "osdi:items": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/items"
        }
    }
}

Back to top…

Scenario: Modifying a organization (PUT)

You can update a organization by calling a PUT operation on that organization’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/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse

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

{
    "organization": "Doctors for Education",
    "email_addresses": [
        {
            "address":"test-new@example.com",
            "primary": true
        }
    ]
}

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",
    "organization": "Labadabadoo",
    "origin_system": "OpenSupporter",
    "browser_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3",
    "administrative_url": "http://osdi-sample-system.org/organizations/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/manage",
    "email_addresses": [
        {
            "address":"test-new@example.com",
            "primary": true,
            "status": "subscribed"
        }
    ],
    "postal_addresses": [
        {
            "primary": true,
            "address_lines": [
                "935 Ed Lock"
            ],
            "locality": "New Dudley",
            "region": "MN",
            "postal_code": "17678",
            "country": "RU",
            "status": "Verified"
        }
    ],
    "phone_numbers": [
        {
            "primary": true,
            "number": 19876543210,
            "number_type": "Mobile",
            "sms_capable": true
        }
    ],
    "_links": {
        "self": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse"
        },
        "osdi:answers": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/answers"
        },
        "osdi:attendance": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/attendance"
        },
        "osdi:signatures": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/signatures"
        },
        "osdi:submissions": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/submissions"
        },
        "osdi:donations": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/donations"
        },
        "osdi:outreaches": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/outreaches"
        },
        "osdi:taggings": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/taggings"
        },
        "osdi:items": {
            "href": "https://osdi-sample-system.org/api/v1/organizations/d91b4b2e-ae0e-4cd3-9ed7-de9uemdse/items"
        }
    }
}

Back to top…

Scenario: Deleting a organization (DELETE)

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

Request

DELETE https://osdi-sample-system.org/api/v1/organizations/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 organization was successfully deleted."
}

Back to top…