探索使用下列功能的支付系統: Flow Service API

Flow Service 用於收集及集中Adobe Experience Platform內各種不同來源的客戶資料。 此服務提供可連線所有支援來源的使用者介面和RESTful API。

本教學課程使用 Flow Service 用於探索付款應用程式的API。

快速入門

本指南需要您實際瞭解下列Adobe Experience Platform元件:

  • 來源: Experience Platform 允許從各種來源擷取資料,同時讓您能夠使用來建構、加標籤和增強傳入資料 Platform 服務。
  • 沙箱: Experience Platform 提供分割單一區域的虛擬沙箱 Platform 將執行個體整合至個別的虛擬環境中,以協助開發及改進數位體驗應用程式。

以下小節提供您需要瞭解的其他資訊,以便使用成功連線到支付應用程式 Flow Service API。

收集必要的認證

本教學課程需要您與您要從中擷取資料的協力廠商付款應用程式建立有效連線。 有效的連線涉及您應用程式的連線規格ID和連線ID。 有關建立付款連線及擷取這些值的詳細資訊,請參閱 將付款來源連線至Platform 教學課程。

讀取範例API呼叫

本教學課程提供範例API呼叫,示範如何格式化您的請求。 這些包括路徑、必要的標頭,以及正確格式化的請求裝載。 此外,也提供API回應中傳回的範例JSON。 如需檔案中用於範例API呼叫的慣例相關資訊,請參閱以下章節: 如何讀取範例API呼叫 在 Experience Platform 疑難排解指南。

收集必要標題的值

為了呼叫 Platform API,您必須先完成 驗證教學課程. 完成驗證教學課程後,會在所有標題中提供每個必要標題的值 Experience Platform API呼叫,如下所示:

  • 授權:持有人 {ACCESS_TOKEN}
  • x-api-key: {API_KEY}
  • x-gw-ims-org-id: {ORG_ID}

中的所有資源 Experience Platform,包括屬於 Flow Service,會隔離至特定的虛擬沙箱。 的所有要求 Platform API需要標頭,用於指定將在其中執行操作的沙箱名稱:

  • x-sandbox-name: {SANDBOX_NAME}

包含裝載(POST、PUT、PATCH)的所有請求都需要額外的媒體型別標頭:

  • Content-Type: 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
    }
]

Inspect表格的結構

若要從您的付款系統檢查表格的結構,請在將表格的路徑指定為查詢引數時執行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,並取得有關其結構的資訊。 您可以在下一個教學課程中使用此資訊來 從您的付款系統收集資料,並將其帶入Platform.

recommendation-more-help
337b99bb-92fb-42ae-b6b7-c7042161d089