Data Ingestion Callback

API Callback Integration Guide to receive Data Ingestion results into Pango

Data Ingestion Callback API Spec

The API - Pango Data Ingestion Callback is used to return the actual data storage results when partners use the Data Ingestion API to push data into PangoCDP. For example:

  • When a partner uses the Data Ingestion API to send customer data into Pango, the API immediately responds to confirm that Pango has received the data and will perform ingestion through a Queue.

  • To know exactly which records are successfully written or failed in the Pango Data Model, partners need to use this Callback API.


API Endpoint: https://your-domain-api.comarrow-up-right

Method: POST

Payload:

{
    "data": {
       "3c439cfc852573428bdb91f5bf96840d10": {
          "status": 200,
          "cdpId": "TAb2P9brterOhKPqOJvs"
       },
       "1c39cc851573728bdb291f5bf96840d10": {
          "status": 101,
          "errorMess":"Missing momCode"
       }
    }
}

Headers:


Headers

Name
Type
Required
Valid Value / Description
Example

Content-type

String

Yes

application/json

application/json

ApiKey

String

No

The ApiKey is sent by the partner in the API ingest request and is used to authenticate the callback information from the Pango system.

Checksum

String

No

The Checksum is generated from the ApiKey provided by the partner and is used to authenticate the callback information from the Pango system. It is required when an ApiKey is present.

Payload Parameters

Name
Type
Required
Valid Value / Description
Example

data

String

Yes

This is a fixed field containing a list of objects, where each Key is a refId provided by the partner through the API Ingestion.

data.refId

String

Yes

The identifying key for each object transmitted by the partner in the Api Ingestion Data

data.refId.status

int

Yes

The field that determines the processing and storage status for each refId.

data.refId.cdpId

String

No

The identifying key is generated by Pango when the data is successfully stored. It appears when the storage operation succeeds (status = 200).

data.refId.errorMessage

String

No

The error message appears when the data storage process fails. It only appears when the storage operation fails (status != 200).

Response

Status
Code
Sample

Failed

400

{ "success":false, "errorCode":"MISSING_INFO", "message":"Field data is required" }

Failed

401

{ "success":false, "errorCode":"MISSING_INFO", "message":"Field data is required" }

Success

200

{ "success": true, "message": "Your request received successfully" }

Persistence Status

Status
Description
Example

200

Successfully stored

101

Input data validation error: - Missing required fields

- Incorrect data format

102

Storage failed

Instructions for creating Checksum for authentication

Note when creating Checksum

  • RefIds: List of RefId values extracted from the object data in the API callback.

  • ApiKey: ApiKey value obtained from the Header of the API callback.

Before starting to generate the Checksum, the RefId list must be sorted alphabetically to ensure consistency in the encoding process.

Steps to generate Checksum

(1) Retrieve the RefId list from the Object data

Refer to the Request Body example:

(2) Sort the RefId list

Sort in alphabetical order. Refer to the example below:

(3) Create Group Key L1

  • Structure: Value1:Value2:ApiKey

  • Combine all data elements from the list, separated by a colon (:), then append the ApiKey.

  • Refer to the example:

    • Value1: 1c39cc851573728bdb291f5bf96840d10

    • Value2: 3c439cfc852573428bdb91fbf96840d1

    • ApiKey: Pango

    • Result:"1c39cc851573728bdb291f5bf96840d10:3c439cfc852573428bdb91fbf96840d1:Pango"

(4) Refer to the example:

  • Structure: ApiKey-Value1-Value2

  • Start with the ApiKey, then concatenate each data element separated by a hyphen (-).

  • Refer to the example:

    • Value1: 1c39cc851573728bdb291f5bf96840d10

    • Value2: 3c439cfc852573428bdb91f5bf96840d10

    • ApiKey: Pango

    • Result: "Pango-1c39cc851573728bdb291f5bf96840d10-3c439cfc852573428bdb91f5bf96840d10

(5) Generate the final Checksum:

  • Structure: GroupKeyL1GroupKeyL2

  • Combine Group Key L1 and Group Key L2, then hash the entire string using the MD5 algorithm to generate the final Checksum value.

  • Refer to the example: MD5.hex("1c39cc851573728bdb291f5bf96840d10:3c439cfc852573428bdb91bf96840d10:PangoPango-1c39cc851573728bdb291f5bf96840d10-3c439cfc852573428bdb91f5bf96840d10") =b1dd22c41d452a312ea095b96ac46bec


View on Google Doc

Last updated

Was this helpful?