Archive, restore and delete organizations (archive, restore, delete)
The archive
, restore
and delete
Ortto endpoints of the organizations
entity are used to archive, restore and delete one or more organization records in Ortto’s customer data platform (CDP).
Learn more about archiving, restoring and deleting organizations under Archiving and deleting organizations.
This page provides descriptions of these endpoint:
- the response payloads.
HTTP method and request resources
Archive endpoint
PUT https://api.ap3api.com/v1/organizations/archive
Restore endpoint
PUT https://api.ap3api.com/v1/organizations/restore
Delete endpoint
DELETE https://api.ap3api.com/v1/organizations/delete
NOTE: Organizations must be archived before they can be restored or deleted.
NOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/ Europe: https://api.eu.ap3api.com/For example: https://api.eu.ap3api.com/v1/<entity/endpoint>
All other Ortto users will use the default service endpoint (https://api.ap3api.com/).
Path and query parameters
This endpoint takes no additional path and/or query parameters.
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 archive, restore or delete one or more organization records in your Ortto account’s CDP.
Example archive organizations request body from Ortto’s CDP
json
{ "inclusion_ids": [ "00609384fa6de6e7a8d89d01" ] }
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
inclusion_ids
array
ofstring
valuesA list of organizations to archive/restore/delete.
You can obtain the organization ID using the
get
endpoint to retrieve one or more organizations. Or, find the contact ID in the Ortto app by viewing the organization’s profile and copying the ID from the URL (e.g.https://ortto.app/myinstance/cdp/organizations/
00626f6dfba865ba45d9c200
/activities?from=cdp-filter&key=organizations-all-
).
exclusion_ids
array
ofstring
valuesA list of organizations to exclude from the archive/restore/delete request.
all_rows_selected
boolean
Setting
all_rows_selected
totrue
allows you to bulk archive, restore and delete organization records.When used to archive organizations,
"all_rows_selected": true
will select all rows in your main organizations list. However, when restoring and deleting organization,"all_rows_selected": true
will select all rows from your archived organizations list.A request body to bulk archive/restore/delete looks like:
json
{ "all_rows_selected": true }
all_rows_selected
can be used in conjunction withexclusion_ids
to make it easier to manage many and exclude few:json
{ "all_rows_selected": true, "exclusion_ids": [ "1064349bbcb6452533ae1100", "10625f9b5be9d668ae359500" ] }
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 organization data that Ortto retrieves from your Ortto account’s CDP after a request to these endpoints.
Example archive organizations response payload from Ortto’s CDP
json
{ "scheduled_organizations": 0, "archived_organizations": 5 }
Response payload elements
The following table lists all elements (arrays, objects, or fields) in the response from a request to these endpoints.
Element
Type
Description
scheduled_organizations
integer
The value indicates the number of organizations that are scheduled to be archived/restored/deleted shortly after the API call.
archived_organizations
integer
The value indicates the number of organizations that were archived during the API call.
restored_organizations
integer
The value indicates the number of organizations that were restored during the API call.
deleted_organizations
integer
The value indicates the number of organizations that were deleted during the API call.