Aristotle Support

API: Individual Enpoints

Article ID: 1243
Last updated: 29 Jul, 2019

w8jTzc3qM7BzAAAAABJRU5ErkJggg==

API: Individual Endpoints

August 2, 2019

Individual endpoints

These 3 endpoints are available to fetch, create or update an individual in 360.

GET https://staging-webapi.aristotle.com/v1/Individuals/{sourceid}

POST https://staging-webapi.aristotle.com/v1/Individuals

PUT  https://staging-webapi.aristotle.com/v1/Individuals/{sourceid}

To use the api, you will need an api key. Pass the api key in the header. Here is an example:

> curl https://staging-webapi.aristotle.com/v1/Individuals/g24657 -H "Authorization: Basic 0C9FA96A-AC06-4CF9-883C-C68E27B3B617"

The POST can be used to create up to 20 individuals. GET and PUT support one individual at a time.

API Property

Required

Notes

GUID

This field is required when updating an individual (PUT).

This GUID and the sourceid must reference the same entity.

Salutation

Maxsize: 30

SourceID

Required when updating an individual (PUT)

SourceID must be unique (POST)

Required if autosourceid is not used (POST)

MaxSize: 50

Prefix

Maxsize: 10

FirstName

Yes

MaxSize: 30

MiddleName

MaxSize: 30

LastName

Yes

MaxSize: 30

Employer

This field is not required. However, if a value is not passed in, the default employer will be removed for the individual. If the individual has multiple employers, one of the other employers will be elevated to be default. If no other employer is found, the lone employer will be removed.

If the passed in employer does not exist, it will be created and assigned as the default employer to the individual

Occupation

This field is not required. However, if a value is not passed in, the individual will be assigned the default occupation in the system.

If the passed in occupation does not exist, the occupation will be created and assigned to the individual

MaxSize: 100

Phones

  • Number

yes

MaxSize: 20

  • Type

yes

Allowed: Home Phone,

Mobile Phone, Work Phone

  • Id

Required to update an existing phone number

  • Default

Default: false

Addresses

Address will run through an address validation service. If it fails validation, the api call will error out.

  • Id

Required if updating an existing address

  • Line1

yes

  • Line2

  • Line3

  • City

  • State

  • Zip5

yes

  • Zip4

  • Type

yes

Allowed: Work, Home

  • Default

Default: false

IndividualeMail

  • Id

Required if updating an existing email

  • Email

yes

  • Type

yes

Allowed: Personal Email, Work Email

  • Default

Default: false

Groups

  • Id

  • GroupName

Yes

If group name does not exist, it will created

  • GroupCategory

Yes

Only existing categories are supported.

Examples

Here is an example of creating individuals:

[http://www.bodurov.com/JsonFormatter/images/Expanded.gif
    {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
        "SourceId": "all244555712", 
        "FirstName": "Albert", 
        "LastName": "Smoot"
    }, 
    {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
        "FirstName": "Alfred", 
        "Prefix": "Mr.", 
        "SourceId": "gll2455712", 
        "MiddleName": "bob", 
        "LastName": "Smith"
    }, 
    {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
        "FirstName": "Sara", 
        "Suffix": "Ms.", 
        "SourceId": "gll244712d", 
        "MiddleName": "bob", 
        "LastName": "Sanders", 
        "Groups": [http://www.bodurov.com/JsonFormatter/images/Expanded.gif
            {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
                "GroupName": "Non-Member", 
                "GroupCategory": "Member Type"
            }
        ]
    }
]

The POST endpoints accepts up to 20 individuals. In the above example, I am creating 3 individuals. The first example (Albert Smoot) shows how to create an individual with the minimum required fields.  The third individual (Sara Sanders) shows how to create individual and add them to the Non-Member group under the Member Type category. The POST will return a json with GUIDs, like this:

[http://www.bodurov.com/JsonFormatter/images/Expanded.gif
    {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
        "GUID": "0b398589-0de7-4fea-985b-8c7786e2d094", 
        "Salutation": "", 
        "Prefix": "", 
        "FirstName": "Albert", 
        "MiddleName": "", 
        "LastName": "Smoot", 
        "SourceID": "all244555712", 
        "Suffix": "", 
        "Employer": "", 
        "Occupation": "", 
        "Phones": [ ], 
        "Addresses": [ ], 
        "IndividualeMail": [ ], 
        "Groups": [ ]
    }, 
    {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
        "GUID": "ccf9c1b6-2318-4988-b439-e51a785fed4e", 
        "Salutation": "", 
        "Prefix": "Mr.", 
        "FirstName": "Alfred", 
        "MiddleName": "bob", 
        "LastName": "Smith", 
        "SourceID": "gll2455712", 
        "Suffix": "", 
        "Employer": "", 
        "Occupation": "", 
        "Phones": [ ], 
        "Addresses": [ ], 
        "IndividualeMail": [ ], 
        "Groups": [ ]
    }, 
    {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
        "GUID": "3bbc8468-0b69-452d-a622-907e02e5a971", 
        "Salutation": "", 
        "Prefix": "", 
        "FirstName": "Sara", 
        "MiddleName": "bob", 
        "LastName": "Sanders", 
        "SourceID": "gll244712d", 
        "Suffix": "Ms.", 
        "Employer": "", 
        "Occupation": "", 
        "Phones": [ ], 
        "Addresses": [ ], 
        "IndividualeMail": [ ], 
        "Groups": [http://www.bodurov.com/JsonFormatter/images/Expanded.gif
            {http://www.bodurov.com/JsonFormatter/images/Expanded.gif
                "Id": "e333657a-6234-43a8-8ad2-64e455de6bcd", 
                "GroupName": "Non-Member", 
                "GroupCategory": "Member Type"
            }
        ]
    }
]

To update an individual, GUID is required. A POST response will include GUIDs or a GET can be used to fetch a record that contains GUIDs. For example, if I no longer want Sara Sanders to belong to the Non-Member group, I would first do a GET for her record using source id, https://staging-webapi.aristotle.com /v1/Individuals/gll244712d. I then take the response and do a PUT without including the group, like this:

{http://www.bodurov.com/JsonFormatter/images/Expanded.gif
    "GUID": "3bbc8468-0b69-452d-a622-907e02e5a971", 
    "Salutation": "", 
    "Prefix": "", 
    "FirstName": "Sara", 
    "MiddleName": "bob", 
    "LastName": "Sanders", 
    "SourceID": "gll244712d", 
    "Suffix": "Ms.", 
    "Employer": "", 
    "Occupation": "", 
    "Phones": [ ], 
    "Addresses": [ ], 
    "IndividualeMail": [ ], 
    "Groups": [ ]
}

This PUT request will remove Sara Sanders from the Non-Member group. The PUT can be used to add, remove, or update any property, except for sourceID and GUID.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 1243
Last updated: 29 Jul, 2019
Revision: 1
Views: 18
Attached files