Create Distribution for Transaction Batch | XM Community
Solved

Create Distribution for Transaction Batch

  • 27 October 2020
  • 1 reply
  • 301 views

I am attempting to create a Distribution for a Transaction Batch following the guide at https://api.qualtrics.com/api-reference/docs/Guides/XM%20Directory/using-transactions-in-iq-directory.md.
I can follow the first two steps successfully:

  1. Create Contact Transaction

  2. Add the Contact Transaction to a Transaction Batch

I then attempt to create a distribution using the Transaction Batch Id, sending a message like the following:
{
"surveyId": "SV_eVfCx8VtSAyX2Sh",
"linkType": "Individual",
"description": "TEST",
"action": "CreateDistribution",
"expirationDate": "2020-10-28 00:00:00",
"transactionBatchId": "BT_tXKBNAd2A0K4xWx"
}
to the Url https://fra1.qualtrics.com/API/v3/distributions
This results in the error:
{
"meta": {
"httpStatus": "400 - Bad Request",
"error": {
"errorMessage": "Unexpected json key provided: transactionBatchId",
"errorCode": "RP_9"
},
"requestId": "a7f368bd-f97a-4917-aaa6-5ed1cd0c92a9"
}
}
According to the reference documentation at https://api.qualtrics.com/api-reference/reference/distributions.json/paths/~1distributions/post this payload matches the 3rd of the 3 allowed formats for the POST message to create a distribution. I need to create a distribution and generate links without sending the links out by email which is why I am using this format. If I cannot get this working I will need to add each contact to its own mailing list so that I can use the 2nd format for the POST message body, which is very far from ideal.
Why is this not working?

icon

Best answer by aradice 27 October 2020, 16:13

View original

1 reply

Have discovered that if I use
"action": "CreateTransactionBatchDistribution"
this works!

Leave a Reply