Manage organization association (add/remove)
The add
and remove
Ortto endpoints of the organizations
entity are used to manage the association of one or more people (contacts) records with organization records in Ortto’s customer data platform (CDP).
Learn more about managing people associated with organizations under Adding and removing people from organizations.
This page provides descriptions of these endpoint:
-
valid parameters, headers, and request body values, as well as
-
the response payloads.
HTTP method and request resources
PUT https://api.ap3api.com/v1/organizations/contacts/add
PUT https://api.ap3api.com/v1/organizations/contacts/remove
Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
For example: https://api.eu.ap3api.com/v1/<entity/endpoint> All other Ortto users will use the default service endpoint (https://api.ap3api.com/). |
Headers
This endpoint requires a custom API key and content type (application/json
for the request body) in the header of the request:
-
X-Api-Key: CUSTOM-PRIVATE-API-KEY
-
Content-Type: application/json
Request body
The request body consists of a JSON object whose valid elements are listed in the table below.
The following JSON object is an example of field and object data that Ortto can recognize to manage the association of one or more people records with organization records in your Ortto account’s CDP.
{
"inclusion_ids": [
"00609384fa6de6e7a8d89d01", "006046baa37f2e24cc56f122"
],
"organization_id": "106051701f79e14b592cee00"
}
You can also add/remove people using a filter
, where all contacts who match the filter will be added/removed from the organization.
For example, if you want to add all contacts with an email address belonging to a particular organization, you could construct a request like the following. In this example, we are going to add all contacts with an email address containing "smithco" (e.g. "jenny@smithco.com") to the organization "Smith & Co" (which has an organization ID of "1062bbe691283847f475c800").
{
"filter": {
"$str::contains":{
"field_id": "str::email",
"value": "smithco"
}
},
"organization_id": "1062bbe691283847f475c800"
}
|
Valid request body elements
The following table lists all valid request body elements (arrays, objects, or fields), which are available to these endpoints.
Element | Type | Description |
---|---|---|
|
|
A list of people to add to or remove from an organization. You can obtain the contact ID using the |
|
|
The organization to add people to or remove people from. You can obtain the organization ID using the |
Object containing a person’s field_ID (representing a person field) used for filtering |
The Therefore, a construct like:
where |
|
|
The |
|
|
Use
|