JSON API » bulk » bulk/destinations/list

Gets the fields of all destinations in a bulk campaign.

Input parameters

Requires authentication and the user role privilege.

NameTypeDescriptionRequiredDefault value
auth_usernameStringAuthentication username.Yes
auth_passwordStringAuthentication password.Yes
campaignIntegerID of campaign.Yes
countInteger1 to return a count, 0 to return full data.No0
descendingInteger1 to sort descending, 0 not to.No0
limitIntegerThe maximum results to return. 0 for all.No0
offsetIntegerThe result to start at. 0 for the first.No0
pagesInteger1 to return a reduced set of data for generating the pages select box, 0 to return full data.No0
sortStringField to sort by. "dnumber" or "status".No"dnumber"

Responses

CodeDescription
200Success.
400Invalid input parameters specified. Check the key and message fields for more details.
401The authentication details provided are invalid.
402Your role does not allow this.
404The campaign does not exist, or you do not have permission to view it.

Data returned

An array of fields, corresponding to the rows of the bulk_destinations table in the database.

Example: With required parameters

http://enswitch.example.com/api/json/bulk/destinations/list/?auth_username=user;auth_password=password;campaign=123

{ "responses":[ { "code":"200", "key":"", "message":"OK" } ], "data":[ { "dtype":"", "dnumber":"2125551234", ... }, { "dtype":"", "dnumber":"2125551235", ... } ] }

Change history

VersionChanges
3.13Function added.