The following JSON objects are examples of field and object data that Ortto can recognize to get data from one or more organization records in your Ortto account’s CDP.
Example get organizations request body from Ortto’s CDP
NOTE: The $has_any_value filter option will return results that have a value of 0 or "". Learn more about empty values.
Example get organizations request body from Ortto’s CDP
json
{
"q": "ortto"
}
Generating filters using the browser's dev tools
Depending on the number of conditions, fields, or activities in your filter, creating it reliably can become complex. Fortunately, we have a trick that lets you copy an already created filter from the browser's dev tools. You can follow these steps if you're using Google Chrome. If you're using a different browser, you may need to adjust the steps accordingly.
Follow the steps below to do this:
Open the browser's dev tools and select the Network tab.
Create the filter in-app on the Organization page.
Locate the create request and click on it.
In the Preview tab, right-click on the filter and select either Copy value or Copy object.
Paste the object into your API call.
Example of where to locate the 'create' request after building the filter in-app.
TIP: When copying the object from the network tab, some non-required fields (e.g. name, timezone, icon) may be included. You can exclude these to keep your API call cleaner, or send the call as is and it will still work.
Retrieve organizations based on Organization ID
To retrieve Organization records based on their IDs, use the following endpoint
POST https://api.ap3api.com/v1/organizations/get-by-ids
Simply include the IDs of the Organizations you want to retrieve within the organization_ids parameter.
Example get organizations request body based on Organization ID
The following table lists all valid request body elements (arrays, objects, or fields), which are available to this endpoint.
Element
Type
Description
cursor_id
string containing a UUID value
(e.g. 00609c898a4490c5800a5453)
The cursor_id element is the UUID for the start of the first organization record in the next page of organizations (defined by the limit member value). This value is retrieved from the previous /v1/organizations/get endpoint request.
sort_by_field_id
string
The sort_by_field_id element whose organization field ID value specifies the organization fields used to sort the people returned from your Ortto account’s CDP.
sort_order
string with value asc or desc
(default value is desc)
The sort_order element determines the order in which the people returned are sorted, based on the sort_by_field_id member value. Specifying this sort_order member is only relevant when the sort_by_field_id member is also specified.
A list of organization_ids to include in the search.
exclusion_ids
array of string values
A list of organization_ids to exclude from the search.
limit
integer between 1 to 500
(default value is 50)
The limit element value determines the number of people to be returned by Ortto from the request.
This value also represents the "page" length of people (for pagination purposes), since potentially many thousands of people records could be retrieved from a single request. This element can be used in conjunction with offset to retrieve subsequent pages of people records.
If this limit element is not specified in the request, or an integer value beyond the permitted maximum is specified, then this value is assumed to be 50.
offset
integer with a default value of 0
The offset element represents the count of people records in your Ortto account’s CDP for pagination purposes, and is the point from which the next page of people (defined by the limit member value) is retrieved.
q
string
The q element is a search parameter used only to find organizations by name.
If you wish to search for organizations by ID, for example, you would need to use the filter` element.
type
string
The type element is a valid text string used to filter the organization records returned by Ortto from the request.
type can accept the following values:
"" (this the default value and will search for all organizations. It can be used with other elements described in this table, including filters as required)
organization
archived_organization
If you are pairing type with archived_organization, you cannot use filters or other elements (only the query string is accepted).
To retrieve a list of archived organizations:
json
{
"type": "archived_organization"
}
Or to use type with a filter, you can construct the body something like this:
The unique identifier for an organization in Ortto’s CDP. This value is retrieved from the previous /v1/organizations/get endpoint request.
filter
Object containing a organizations’s field ID (representing an organization field) used for filtering
The filter element contains a field member that determines whether records are filtered with ($has_any_value) or without ($has_no_value) a person field’s value.
Response payload
The response payload consists of a JSON object with the elements listed in the table below.
The following JSON object is an example of the tag data that Ortto retrieves from your Ortto account’s CDP after a request to this endpoint.
Example get organizations response payload from Ortto’s CDP