Embrace Mobile
 

Respondent API


Add
Delete
Update
SendApp
Get


https://host/restModule/respondent/add


Adds a new respondent.

respondent_number = 447977503087 - the number of the respondent. International Format. (REQUIRED)

default_country = (UK|FR|GE) - will attempt to turn the number into international format if its starts will a 0. EG, UK would mean that 0 was changed to 44. Has no effect if the number is already international. (OPTIONAL)

delivery_method = (SMS|BROWSER|APP) - the type of delivery the respondent will use. (REQUIRED)

push_method = (SMS|WAPPUSH) - the type of message to use when pushing content out. Default is WAPPUSH. (OPTIONAL)

group_names = myGroup - a comma (',') separated list of groups to add the user into. (OPTIONAL)

create_group_if_not_exist = (true|false) - whether to create the group(s) if they don't exist in the group_name list. Ignored if group_name is not specified. Default is false. (OPTIONAL)

dispatch_to_dispatched = (true|false) - whether to dispatch respondent for dispatches active for groups it is added to. Default is false. (OPTIONAL)

dispatch_names = myDispatch,myDispatch2 - a ',' separated list of the names of the dispatches for which respodent will be dispatched if dispatch_to_dispatched is set to true. Respondent will be dispached for all active dispatches if neither dispatch_names or dispatch_ids is specified. (OPTIONAL)

dispatch_ids = 1,2 - a ',' separated list of the ids of the dispatches for which respodent will be dispatched if dispatch_to_dispatched is set to true. Respondent will be dispached for all active dispatches if neither dispatch_names or dispatch_ids is specified. (OPTIONAL)

Errors:
  • InvalidNumberError
  • RespondentExistsError
  • CountryUnknownError
  • DeliveryMethodUnknownError
  • PushMethodUnknownError
  • NoSuchGroupError
  • DispatchDoesNotExistError

https://host/restModule/respondent/delete


Deletes a list of respondents.

respondent_numbers = 447977503087 - a comma (',') separated list of respondent numbers to be deleted. International Format. (EITHER respondent_numbers OR respondent_ids MUST be provided)

respondent_ids = 1,2 - a comma (',') separated list of respondent ids to be deleted. (EITHER respondent_numbers OR respondent_ids MUST be provided)

Errors:
  • RespondentDoesNotExistError

https://host/restModule/respondent/update


Updates a respondent.

respondent_number = 447977503087 - the number of the respondent to be updated. International Format. (EITHER respondent_number OR respondent_id MUST be provided)

respondent_id = 1 - the id of the respondent to be updated. (EITHER respondent_number OR respondent_id MUST be provided)

new_delivery_method = (SMS|BROWSER|APP) - the type of delivery the respondent will use. (OPTIONAL)

new_number = 447977503087 - the new number of the respondent. International Format. (OPTIONAL)

default_country = (UK|FR|GE) - will attempt to turn the number into international format if its starts will a 0. EG, UK would mean that 0 is changed to 44. Has no effect if the number is already international. Has no effect if new_number is not defined.(OPTIONAL)

new_push_method = (SMS/WAPPUSH) - the type of message to use when pushing content out. Default is WAPPUSH. (OPTIONAL)

Errors:
  • RespondentDoesNotExistError
  • RespondentExistsError - when the number we are updating to exists already
  • CountryUnknownError
  • InvalidNumberError
  • DeliveryMethodUnknownError
  • PushMethodUnknownError

https://host/restModule/respondent/sendApp


respondent_numbers = 447977503087 - a comma (',') separated list of respondent numbers that the java app will be sent to. International Format. (EITHER respondent_numbers OR respondent_ids MUST be provided)

respondent_ids = 1,2 - a comma ',' separated list of respondent ids that the java app will be sent to. (EITHER respondent_numbers OR respondent_ids MUST be provided)

Errors:
  • RespondentDoesNotExistError

https://host/socrates/restModule/respondent/get


All method parameters include the following:

Returns an XML document representing the requested respondents. If no respondents are requested then all are returned.

respondent_numbers = 447977503087 - a comma (',') separated list of respondent numbers to be returned. International Format. (OPTIONAL)

respondent_ids = 1,2 - a comma (',') separated list of respondent ids to be returned. (OPTIONAL)

Errors:
  • RespondentDoesNotExistError
Returns:

<respondents xmlns="http://www.embracemobile.com/socrates2/1.0" >
  <respondent id="4" phone_number="447977503087" delivery_method="(SMS|BROWSER|APP)" push_method="(WAPPUSH|SMS)">
    <groups>
        <group name="group1" id="1" />
        <group name="group2" id="2" />
    </groups>
    <dispatches>
        <dispatch name="dispatch1" id="1" />
        <dispatch name="dispatch2" id="2" />
    </dispatches>
  </respondent>
</respondents>