Unique PINs API

This API is used to upload a set a unique PINs that are used to generate unique survey URLs.

Command

"client/uniquePINs/1"


This API assumes that the surveyURL (specified in the survey using submitProject or updateProject contains {uniquepin}. The unique PINs uploaded with this API will be substituted into the {uniquepin} parameter. For example:

http://the.link.to.the.survey/survey?sesskey={sesskey}&id={uniquepin}

where the pins are "123", "456", "789", ...

The contents of the unique PIN may be anything, including special characters that have meaning in a URL, allowing multiple HTTP parameters to be chained together in the unique PIN. For example:

http://the.link.to.the.survey/survey?sesskey={sesskey}&{uniquepin}

where the pins are "a=1&b=2", "a=3&b=4", "a=5&b=6", ...

The list of PINs will be used in the order they appear in the list. If the API is called a second time, it replaces the old list and starts using PINs from the beggining of the new list.


Inputs

The following values are expected in the JSON body:

Name Type Required Description
command String

Must be "client/uniquePINs/1"

rfg_id String

RFG project identifier. This is the identifier you received when you submitted the project.

pins String[]

Array of PINs.


Outputs

The JSON output will always contain the original command and a result. If the result > 0, an error has occurred (refer to Error Codes) and a message field will describe the error. If result = 0, the command succeeded and there will not be response field.


Example Command

{
    command : "client/uniquePINs/1",
    rfg_id : "RFG12345-001",
    pins : ["ABC","DEF","GHI"]
}