curl --request POST \
--url https://api.sandbox.asapp.com/metadata-ingestion/v1/many-customer-metadata \
--header 'Content-Type: application/json' \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>' \
--data '
{
"items": [
{
"externalConversationId": "id-509",
"externalCustomerId": "[email protected]",
"eventId": "eventId-1938",
"status": "new",
"phoneNumber": "(555)555-0100",
"emailAddress": "[email protected]",
"userId": "user908038",
"addressCountry": "United-States",
"addressState": "New-York",
"addressZipcode": "10001",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
},
{
"externalConversationId": "id-203",
"externalCustomerId": "[email protected]",
"eventId": "eventId-1331",
"status": "existing",
"phoneNumber": "(555)555-0101",
"emailAddress": "[email protected]",
"userId": "user3201033",
"addressCountry": "United-States",
"addressState": "New-York",
"addressZipcode": "10002",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
},
{
"externalConversationId": "id-69221",
"externalCustomerId": "555.555.0191",
"attributes": null
},
{
"externalConversationId": "id-69223",
"externalCustomerId": "555.555.0193"
},
{
"externalConversationId": "id-69229",
"externalCustomerId": "[email protected]",
"phoneNumber": null,
"userId": null,
"addressCountry": null
}
]
}
'{
"errorCount": 1,
"results": [
{
"eventId": "5484e507-feaf-11ec-bfc1-fda566fa9333",
"error": "FAIL_BAD_PARAMS: ERROR: agent id cannot be blank"
},
{
"eventId": "fcf99667-feaf-11ec-a42e-11799134528c",
"error": ""
}
]
}Add multiple customer metadata items; submit items in a batch in one request
curl --request POST \
--url https://api.sandbox.asapp.com/metadata-ingestion/v1/many-customer-metadata \
--header 'Content-Type: application/json' \
--header 'asapp-api-id: <api-key>' \
--header 'asapp-api-secret: <api-key>' \
--data '
{
"items": [
{
"externalConversationId": "id-509",
"externalCustomerId": "[email protected]",
"eventId": "eventId-1938",
"status": "new",
"phoneNumber": "(555)555-0100",
"emailAddress": "[email protected]",
"userId": "user908038",
"addressCountry": "United-States",
"addressState": "New-York",
"addressZipcode": "10001",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
},
{
"externalConversationId": "id-203",
"externalCustomerId": "[email protected]",
"eventId": "eventId-1331",
"status": "existing",
"phoneNumber": "(555)555-0101",
"emailAddress": "[email protected]",
"userId": "user3201033",
"addressCountry": "United-States",
"addressState": "New-York",
"addressZipcode": "10002",
"attributes": [
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]
},
{
"externalConversationId": "id-69221",
"externalCustomerId": "555.555.0191",
"attributes": null
},
{
"externalConversationId": "id-69223",
"externalCustomerId": "555.555.0193"
},
{
"externalConversationId": "id-69229",
"externalCustomerId": "[email protected]",
"phoneNumber": null,
"userId": null,
"addressCountry": null
}
]
}
'{
"errorCount": 1,
"results": [
{
"eventId": "5484e507-feaf-11ec-bfc1-fda566fa9333",
"error": "FAIL_BAD_PARAMS: ERROR: agent id cannot be blank"
},
{
"eventId": "fcf99667-feaf-11ec-a42e-11799134528c",
"error": ""
}
]
}A request to send more than one customer metadata; send a list of items
1 - 1000 elementsShow child attributes
Conversation ID from the external chat / voice system
256"issue509"
The customer id involved in respect to the issue in question
256An event id used to track the submission; if none is provided, service will generate one
256"eventId-1938"
The descriptive label to describe the customer's status and/or type
256"new"
The customer's phone number
32"(555)555-0100"
The customer's email address
The customer's user Id
256"user908038"
The country portion of the customer's address
128"United-States"
The state portion of the customer's address
128"New-York"
The zipcode/postal code portion of the customer's address
16"10001"
A map of key-value pairs for extra metadata attributes
10[
{
"name": "attr1_name",
"value": "attr1_value"
},
{
"name": "attr2_name",
"value": "attr2_value"
}
]200 - Success | Partial Success Submit a batch of items to the service to be ingested. Record can be traced back to the submitted record by the eventId. If any of the records encounter issue during the ingestion, a message sent status will be returned with an error message for each record. A 200 success is returned as long as there is one item ingested successfully, i.e., "partial success".
Number of message sent with error(s)
A list of send result
Show child attributes
An UUID identifier string computed for the submitted event message
"5484e507-feaf-11ec-bfc1-fda566fa9333"
Status of the failed message if value is not blank; the error is contained in the string
"FAIL_BAD_PARAMS: ERROR: agent id cannot be blank"
Was this page helpful?