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/get
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.
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
a2
Autopilot Journeys
bc
BigCommerce
cl
Calendly
cb
Chargebee
cm
Custom activities, attributes and fields.
fb
gl
gg
Gorgias
hs
HelpScout
ln
mg
Magento
o
Organization
osr
Organization scores
pi
Pipedrive
ps
PrestaShop
r
Recurly
osa
Salesforce account fields
osb
Salesforce account custom fields
sfk
Salesforce campaign fields
skc
Salesforce campaign custom fields
sfc
Salesforce contact fields
scc
Salesforce contact custom fields
sfl
Salesforce lead fields
slc
Salesforce lead custom fields
soc
Salesforce custom object
sfo
Salesforce object
sfp
Salesforce opportunity fields
spc
Salesforce opportunity custom fields
oso
Salesforce organization fields
osc
Salesforce organization custom fields
sft
Salesforce task fields
stc
Salesforce task custom fields
sc
Scores
sm
Segment
sh
Shopify
sk
Slack
sf
SMS form
st
Stripe
sw
Swell
""
System (Ortto)
tw
tf
Typeform
wf
Widget form
wc
WooCommerce
zd
Zendesk
Response payload
The following JSON object is an example of
cm
referring 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" } } } }