Retrieve account/instance schema via API
Overview
The get Ortto endpoint of the instance/schema entity is used to retrieve schema data within Ortto’s customer data platform (CDP).
This can support some returning custom fields, custom activities, scores, schema for integrations and more.
This page provides descriptions of this endpoint’s:
- The response payload.
HTTP method and request resource
POST https://api.ap3api.com/v1/instance-schema/getNOTE: 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/jsonfor the request body) in the header of the request:
X-Api-Key: CUSTOM-PRIVATE-API-KEYContent-Type: application/jsonRequest body
The request body consists of a JSON object whose valid elements are listed in the table below.
Example get account/schema request body from Ortto’s CDP
json
{ "namespaces" : ["cm"] }If you want to return all, you can do so by:
json
{ "namespaces" : [] }Valid request body elements
The following table lists all valid, optional request body elements that are available at this endpoint.
This list is subject to change as it can depend on the integrations, objects and data available within your account.
Namespace ID
Description
a2Autopilot Journeys
bcBigCommerce
clCalendly
cbChargebee
cmCustom activities, attributes and fields.
fb
gl
ggGorgias
hsHelpScout
ln
mgMagento
oOrganization
osrOrganization scores
piPipedrive
psPrestaShop
rRecurly
osaSalesforce account fields
osbSalesforce account custom fields
sfkSalesforce campaign fields
skcSalesforce campaign custom fields
sfcSalesforce contact fields
sccSalesforce contact custom fields
sflSalesforce lead fields
slcSalesforce lead custom fields
socSalesforce custom object
sfoSalesforce object
sfpSalesforce opportunity fields
spcSalesforce opportunity custom fields
osoSalesforce organization fields
oscSalesforce organization custom fields
sftSalesforce task fields
stcSalesforce task custom fields
scScores
smSegment
shShopify
skSlack
sfSMS form
stStripe
swSwell
""System (Ortto)
tw
tfTypeform
wfWidget form
wcWooCommerce
zdZendesk
Response payload
The following JSON object is an example of
cmreferring to custom activities, attributes, and fields that Ortto retrieves from your Ortto account’s CDP after a request to this endpoint.NOTE: The response may vary based on the Namespace ID you request, as we return data specific to each account and its namespace.
json
{ "namespaces":{ "cm":{ "id":"cm", "fields":{ "act:cm:book-purchased":{ "id":"act:cm:book-purchased", "data_source_id":"629ee15fb68492e35698f4e8", "name":"Book Purchased", "icon_id":"orders-illustration-icon", "display_type":"activity", "archived_at":"2022-11-24T03:01:29.8Z", "attributes":[ { "id":"str:cm:book-name", "name":"Book Name", "display_type":"text", "liquid_name":"activity.custom.book-purchased.book-name" }, { "id":"str:cm:book-price", "name":"Book Price", "display_type":"text", "liquid_name":"activity.custom.book-purchased.book-price" }, { "id":"geo::country", "name":"Country", "display_type":"geo", "liquid_name":"activity.custom.book-purchased.country" }, { "id":"geo::region", "name":"Region", "display_type":"geo", "liquid_name":"activity.custom.book-purchased.region" }, { "id":"geo::city", "name":"City", "display_type":"geo", "liquid_name":"activity.custom.book-purchased.city" }, { "id":"geo::position", "name":"Position", "display_type":"geo", "liquid_name":"activity.custom.book-purchased.position" }, { "id":"str::t", "name":"Timezone", "display_type":"single_select", "liquid_name":"activity.custom.book-purchased.timezone" } ], "triggers":[ { "field_id":"l", "operation":"set_if_greater" }, { "field_id":"f", "operation":"set_if_less" }, { "field_id":"str::lt", "operation":"set", "attribute_id":"str::t" } ] } }, "bol:cm:checkbox":{ "id":"bol:cm:checkbox", "name":"Checkbox", "display_type":"bool", "liquid_name":"people.custom.checkbox" } } } }