Metadata
Add multiple customer metadata
ASAPP APIs
- Overview
- Conversations
- GenerativeAgent
- AutoSummary
- AutoTranscribe
- AutoCompose
- Knowledge Base
- File Exporter
- Metadata
- Health Check
Metadata
Add multiple customer metadata
Add multiple customer metadata items; submit items in a batch in one request
POST
/
metadata-ingestion
/
v1
/
many-customer-metadata
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": "555.555.0100-jdoe@example.com",
"eventId": "eventId-1938",
"status": "new",
"phoneNumber": "(555)555-0100",
"emailAddress": "jdoe@example.com",
"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": "555.555.0101-mdoe@example.com",
"eventId": "eventId-1331",
"status": "existing",
"phoneNumber": "(555)555-0101",
"emailAddress": "mdoe@example.com",
"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": "zdoe@example.com",
"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": ""
}
]
}
Body
application/json
A request to send more than one customer metadata; send a list of items
Conversation ID from the external chat / voice system
Maximum length:
256
The customer id involved in respect to the issue in question
Maximum length:
256
An event id used to track the submission; if none is provided, service will generate one
Maximum length:
256
The descriptive label to describe the customer's status and/or type
Maximum length:
256
The customer's phone number
Maximum length:
32
The customer's email address
The customer's user Id
Maximum length:
256
The country portion of the customer's address
Maximum length:
128
The state portion of the customer's address
Maximum length:
128
The zipcode/postal code portion of the customer's address
Maximum length:
16
Response
200
application/json
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)
Was this page helpful?
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": "555.555.0100-jdoe@example.com",
"eventId": "eventId-1938",
"status": "new",
"phoneNumber": "(555)555-0100",
"emailAddress": "jdoe@example.com",
"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": "555.555.0101-mdoe@example.com",
"eventId": "eventId-1331",
"status": "existing",
"phoneNumber": "(555)555-0101",
"emailAddress": "mdoe@example.com",
"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": "zdoe@example.com",
"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": ""
}
]
}