Generate Custom Distribution Links - error | XM Community
Skip to main content

I’m trying to generate a “Generate Custom Distribution Links”. 

I start by creating a 1st api to get Distribution ID, and I get a result: EMD_f8QQenNO38ZFEol

 

 

{
  "message": {
    "libraryId": "GR_8q1TNbBxx7Q5TyS",
    "messageText": "Example Message Text"
  },
  "recipients": {
    "mailingListId": "CG_2VdLIP44sg4X0qc",
    "directoryId": "POOL_DtPeG9ooR50oSA1"
  },
  "header": {
    "fromEmail": "apiexample@qualtrics.com",
    "replyToEmail": "apiexample@qualtrics.com",
    "fromName": "Test Name",
    "subject": "Example Subject"
  },
  "surveyLink": {
    "surveyId": "SV_agUQBVnQcGsoO7I",
    "expirationDate": "2025-08-24T14:15:22Z",
    "type": "Individual"
  },
  "embeddedData": {
    "level": "sim",
    "property2": "string"
  },
  "sendDate": "2019-08-24T14:15:22Z"
}

 

  1. Then I start a second API to get the links, bringing the $.result.id from the previous one.

 

I get these error: {"meta":{"httpStatus":"400 - Bad Request","error":{"errorMessage":"Expected param not found: surveyId","errorCode":"RP_10"},"requestId":"8d6e5552-fc15-48bb-ac54-73ec496c9ce8"}}

 

{  "name": "The task is configured incorrectly. Review the task’s configuration then try again.",  "message": "{\"meta\":{\"httpStatus\":\"400 - Bad Request\",\"error\":{\"errorMessage\":\"Expected param not found: surveyId\",\"errorCode\":\"RP_10\"},\"requestId\":\"0c0b8b22-b2eb-46bf-896d-4274ebe2ae75\"}}",  "needRetry": false}

 

Can you help me? Do I have , somehow, bring the surveyid to the second api?

@Susana_Branco List distribution links require surveyID in the parameter. Also, i wouldn’t recommend this API in Workflow if your distribution are 100 contacts or more. Because each list only contain maximum of 100 and you will have to turn multiple pages. If that’s the case, ask your IT guys to do it for you or you will have to code something else outside of Qualtrics


Got it, it works.

Thanks for the heads-up. What I actually want is to generate a CSV with distribution links and upload it to an SFTP server. I'm struggling with generating the file itself.


Leave a Reply