Flow Service 用於收集和集中Adobe Experience Platform內不同來源的客戶資料。 該服務提供了用戶介面和REST風格的API,所有支援的源都可從中連接。
本教程使用 Flow Service API,用於瀏覽付款應用程式。
本指南要求對Adobe Experience Platform的下列組成部分有工作上的理解:
以下各節提供了您需要瞭解的附加資訊,以便使用 Flow Service API。
本教程要求您與要從中接收資料的第三方支付應用程式建立有效連接。 有效連接涉及應用程式的連接規範ID和連接ID。 有關建立付款連接和檢索這些值的詳細資訊,請參閱 將支付源連接到平台 教程。
本教程提供了示例API調用,以演示如何格式化請求。 這些包括路徑、必需的標頭和正確格式化的請求負載。 還提供了API響應中返回的示例JSON。 有關示例API調用文檔中使用的約定的資訊,請參見上的 如何讀取示例API調用 的 Experience Platform 疑難解答指南。
為了呼叫 Platform API,必須首先完成 驗證教程。 完成身份驗證教程將提供所有中每個必需標頭的值 Experience Platform API調用,如下所示:
{ACCESS_TOKEN}
{API_KEY}
{ORG_ID}
中的所有資源 Experience Platform包括那些 Flow Service,與特定虛擬沙箱隔離。 所有請求 Platform API需要一個標頭,該標頭指定操作將在以下位置進行的沙盒的名稱:
{SANDBOX_NAME}
所有包含負載(POST、PUT、PATCH)的請求都需要附加的媒體類型報頭:
application/json
使用付款系統的連接ID,您可以通過執行GET請求來瀏覽資料表。 使用以下調用查找要檢查或插入的表的路徑 Platform。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=root
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
付款基礎連接的ID。 |
要求
curl -X GET \
'http://platform.adobe.io/data/foundation/flowservice/connections/24151d58-ffa7-4960-951d-58ffa7396097/explore?objectType=root' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
回應
成功的響應從付款系統返回一組表。 查找要放入的表 Platform 並注意到 path
屬性,因為在下一步中需要提供該屬性來檢查其結構。
[
{
"type": "table",
"name": "PayPal.Billing_Plans",
"path": "PayPal.Billing_Plans",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "PayPal.Billing_Plans_Payment_Definition",
"path": "PayPal.Billing_Plans_Payment_Definition",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "PayPal.Billing_Plans_Payment_Definition_Charge_Models",
"path": "PayPal.Billing_Plans_Payment_Definition_Charge_Models",
"canPreview": true,
"canFetchSchema": true
},
{
"type": "table",
"name": "PayPal.Catalog_Products",
"path": "PayPal.Catalog_Products",
"canPreview": true,
"canFetchSchema": true
}
]
要從付款系統檢查表的結構,請在將表的路徑指定為查詢參數時執行GET請求。
API格式
GET /connections/{BASE_CONNECTION_ID}/explore?objectType=table&object={TABLE_PATH}
參數 | 說明 |
---|---|
{BASE_CONNECTION_ID} |
付款系統的連接ID。 |
{TABLE_PATH} |
付款系統中表的路徑。 |
curl -X GET \
'http://platform.adobe.io/data/foundation/flowservice/connections/24151d58-ffa7-4960-951d-58ffa7396097/explore?objectType=table&object=test1.Mytable' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
回應
成功的響應返回指定表的結構。 有關每個表列的詳細資訊位於 columns
陣列。
{
"format": "flat",
"schema": {
"columns": [
{
"name": "Product_Id",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Product_Name",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Description",
"type": "string",
"xdm": {
"type": "string"
}
},
{
"name": "Type",
"type": "string",
"xdm": {
"type": "string"
}
},
]
}
}
通過學習本教程,您已探索了支付系統,找到了要插入的表的路徑 Platform並獲取了有關其結構的資訊。 您可以在下一教程中使用此資訊 從您的支付系統收集資料並將其導入平台。