Archive, restore and delete accounts (previously organizations)
The archive
, restore
and delete
Ortto endpoints of the accounts
entity are used to archive, restore and delete one or more account records in Ortto’s customer data platform (CDP).
Learn more about archiving, restoring and deleting accounts.
This page provides descriptions of these endpoint:
- the response payloads.
HTTP method and request resources
Archive endpoint
PUT https://api.ap3api.com/v1/accounts/archive
Restore endpoint
PUT https://api.ap3api.com/v1/accounts/restore
Delete endpoint
DELETE https://api.ap3api.com/v1/accounts/delete
NOTE: Accounts 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 account records in your Ortto account’s CDP.
Example archive accounts 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 accounts to archive/restore/delete.
You can obtain the account ID using the
get
endpoint to retrieve one or more accounts. Or, find the contact ID in the Ortto app by viewing the accounts profile and copying the ID from the URL (e.g.https://ortto.app/myinstance/cdp/accounts/
00626f6dfba865ba45d9c200
/activities?from=cdp-filter&key=accounts-all-
).
exclusion_ids
array
ofstring
valuesA list of accounts 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 account records.When used to archive accounts,
"all_rows_selected": true
will select all rows in your main accounts list. However, when restoring and deleting account,"all_rows_selected": true
will select all rows from your archived accounts 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 account data that Ortto retrieves from your Ortto account’s CDP after a request to these endpoints.
Example archive accounts response payload from Ortto’s CDP
json
{ "scheduled_accounts": 0, "archived_accounts": 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_accounts
integer
The value indicates the number of accounts that are scheduled to be archived/restored/deleted shortly after the API call.
archived_accounts
integer
The value indicates the number of accounts that were archived during the API call.
restored_accounts
integer
The value indicates the number of accounts that were restored during the API call.
deleted_accounts
integer
The value indicates the number of accounts that were deleted during the API call.