From RPM Wiki
| Table of contents |
[edit]
Summary
API: Add a participant to a form
[edit]
Request
You need to identify the form and the user to add
- Either the form ID or form number + process is needed.
- User can be identified by username, or
- An agency can be identified then RPM will add a user from that agency.
- The user added is the first user in the agency by database order, starting with managers
Form by form ID, user by username
{
"Key":"{api key}",
"Form": {
"FormID":"{form id}"
},
"Username":"{user name}"
}
By form number + process name, user by agency ID
{
"Key":"{api key}",
"Process":"{process name}",
"Form": {
"Number":"{form number}"
},
"AgencyID":"{agency ID}"
}
By form number + process ID, user by agency name
{
"Key":"{api key}",
"ProcessID":"{process ID}",
"Form": {
"Number":"{form number}",
},
"Agency": "{agency name}"
}
[edit]
Examples
http://demo.rpmsoftware.com/rpm/Api.svc/ProcFormParticipantAdd
{
"Key":"abc123def456",
"ProcessID":"12",
"Form": {
"Number":"Q123456"
},
"Username":"johnsmith1"
}
[edit]
Response
Use the response from Api/ProcForm
[edit]
Errors
- "Process not found"
- "Form not found"
- "Permission denied" (the API user does not have permission to add participants to that form)
- "User not allowed" (the specified user does have permission to be added to that form)
- "User not found" (the username does not exist or does not belong to this subscriber)
- "Agency has no eligible users"
- "Agency not found"
[edit]
Details
- Form history will show the new "API" method
- Same things happen here as if the participant was added by the UI, such as email notification
[edit]
History
- Greenman: Feature added
- This page was last modified 20:25, 25 Feb 2010.
- This page has been accessed 1285 times.
