I can't tell you for sure which settings were incorrect for most of my attempts, but I got the API working to turn a campaign off by:
1. Using the GET version of /api/v2/outbound/campaigns/{campaignId} to pull back all the information for my campaign. One key piece of information being the Version (because if you don't use the correct Version in the PUT the update will fail every time).
2. Using the PUT version of /api/v2/outbound/campaigns/{campaignId} by copying all the JSON from the return of 1. to create the body for the PUT, just changing the campaignStatus to "off"
That worked for turning the campaign on and then back off.
So, your script would need to do the GET first, then use the entire Body of the return to create the PUT, just changing the canpaignStatus.
------------------------------
George Ganahl GCP (PureCloud) ICCE CCXP
Principal Technology Consultant
Genesys
------------------------------
Original Message:
Sent: 08-20-2019 16:17
From: Lucas Rios
Subject: possibility to stop campaigns
Hello Team,
Our customer is trying to stop the campaigns by API, but not being possible, we are trying to use the PUT / api / v2 / outbound / campaigns / {campaignId} API, and setting the status to "off" or "stopping", but it doesn't work the same way, so the customer is having to stop each campaign at a time.
Does Genesys propose any other custom APIs or statuses to meet this demand?
Some CorrelationID returnig the error.
4946c331-22fc-4aed-b3cc-19a59781b298.
419093bb-fe0b-4659-92f3-c879072b44ab
Regards
Lucas
#Integrations
------------------------------
Lucas Rios
Wittel Comunicacoes Ltda
------------------------------