SergioRota | 2020-03-09 10:13:43 UTC | #1
Hi,
I'm using this API to retrieve contacts from contactlist (for using they in IVR): /api/v2/outbound/contactlistfilters/preview
Response:
{ "filteredContacts": 11, "totalContacts": 11, "preview": [ { "id": "360f72b624cf7cf1bf7d92f6c86ec151", "contactListId": "530897f9-bac4-4c95-9128-092aa4ec3478", "data": { "NomeCompleto": "Andrea Bianchi", "NumeroTelefono": "+39**", "Esito": "null", "Note": "null" }, "callable": false, "selfUri": "/api/v2/outbound/contactlists/530897f9-bac4-4c95-9128-092aa4ec3478/contacts/360f72b624cf7cf1bf7d92f6c86ec151" }, { "id": "b5bc91de70b7f589c08fff346c7af05d", "contactListId": "530897f9-bac4-4c95-9128-092aa4ec3478", "data": { "NomeCompleto": "Mario Rossi", "NumeroTelefono": "+39**", "Esito": "null", "Note": "null" }, "callable": false, "selfUri": "/api/v2/outbound/contactlists/530897f9-bac4-4c95-9128-092aa4ec3478/contacts/b5bc91de70b7f589c08fff346c7af05d" }, { "id": "18bb36ff65b37a664fd1a7f7d804c137", "contactListId": "530897f9-bac4-4c95-9128-092aa4ec3478", "data": { "NomeCompleto": "Andrea Rossi", "NumeroTelefono": "+39**", "Esito": "null", "Note": "null" }, "callable": false, "selfUri": "/api/v2/outbound/contactlists/530897f9-bac4-4c95-9128-092aa4ec3478/contacts/18bb36ff65b37a664fd1a7f7d804c137" }, { "id": "f9086881694eb0119a86a7382fb8b6c1", "contactListId": "530897f9-bac4-4c95-9128-092aa4ec3478", "data": { "NomeCompleto": "Mario Bianchi", "NumeroTelefono": "+39**", "Esito": "null", "Note": "null" }, "callable": false, "selfUri": "/api/v2/outbound/contactlists/530897f9-bac4-4c95-9128-092aa4ec3478/contacts/f9086881694eb0119a86a7382fb8b6c1" }, { "id": "47a3ea411561a8df395db54c863183a6", "contactListId": "530897f9-bac4-4c95-9128-092aa4ec3478", "data": { "NomeCompleto": "Andrea Mario", "NumeroTelefono": "+39****", "Esito": "null", "Note": "null" }, "callable": true, "selfUri": "/api/v2/outbound/contactlists/530897f9-bac4-4c95-9128-092aa4ec3478/contacts/47a3ea411561a8df395db54c863183a6" } ] }
the API call retrieves only 5 of the 11 contacts
Thanks Sergio
tim.smith | 2020-03-09 22:35:53 UTC | #2
That API operation only selects 5 contacts from the list that match the filter. There is no way to get the full list of contacts for a filter. You can request new features at https://purecloud.ideas.aha.io/ideas.
SergioRota | 2020-03-10 08:05:10 UTC | #3
Thank you Tim.
So, how can I query the contact list for have the array with all contacts (also without filters) ?
anon28066628 | 2020-03-10 13:19:44 UTC | #4
Querying the entire list isn't supported today. If you need to manipulate contacts mid-campaign, the most direct way to do that is creating the list with externally-defined unique ids. You can then query the source system by any field and update the contact in G Cloud via the contact id.
tim.smith | 2020-03-10 13:21:22 UTC | #5
The only way to get all contacts in a list is to use POST /api/v2/outbound/contactlists/{contactListId}/export to export them as a CSV file and download the file.
system | 2020-04-10 13:21:23 UTC | #6
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 7298