Introduction
Welcome to the Wufoo API! You can use our API to access your forms, entries, reports, submit new entries, and add or remove Webhooks.
Structure
Our API can be used by making requests with any HTTP service/client/library. To help you get started with building your own integrations, we’ll include basic code samples in this area. You can switch the language of the examples with the tabs at the top.
Each resource page will go into more detail, but here’s a quick overview of how the Wufoo API is structured
When making a request, you’ll use your specific account subdomain. For example: https://fishbowl.wufoo.com
All of our API resources then start with: /api/v3
To help keep things organized, we’ve broken up our API into logical sections based on the different aspects of Wufoo. These are:
Name | Endpoint | HTTP Methods |
---|---|---|
Forms | /forms |
GET |
Entries | /entries |
GET or POST |
Reports | /reports |
GET |
Users | /users |
GET |
Webhooks | /webhooks |
PUT or DELETE |
Login | /login |
POST |
Some requests require you to identify the specific resource you’re trying to access. The most commonly used example would be a form identifier. To uniquely identify a specific form, you can use either
the “hashed” URL: /forms/s1afea8b1vk0jf7/
or the form title: /forms/wufoo-api-example/
Forms and Reports resources have a “hashed” and a “title” identifier. Widgets, Users, and WebHooks resources only have hash identifiers.
Finally, each request will end with a format extension. Our API can return responses in either .json
or .xml
format.
A complete request will look like this: https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7.json
Optional query parameters can also be added to the end of the request like so:
https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7.json?pretty=true&includeTodayCount=true
API Key
All examples use the demo ‘fishbowl’ subdomain. When making your own requests, be sure to use your own account name/subdomain, and your own API Key.
To use any of the API functions, you’ll need to use your Wufoo API Key. If you haven’t already, you can follow these steps to locate your key:
- Log in to your Wufoo account
- From the Form Manager, select API Information from the More dropdown on any form.
- On that page there is a 16 digit code, which is your unique API key.
Form Hashes and Field Ids
Many API calls also involve using a Form’s hash or the API ID for a form’s field. To locate this information:
- Log in to your Wufoo account
- From the Form Manager, select API Information from the More dropdown on the form you want to make calls against.
- In the table below your API Key you will find an API ID for each field and your form’s Hash.
Restrictions
We currently restrict API usage per key, per day. Your API usage is dependent on your plan. Check out how many requests you have per day on our pricing page.
For security, API request can only be made using HTTPS. Our servers will block request made using SSLv3 or lower, so be sure to force TLSv1 or higher if your default SSL/TLS version is different.
Authentication
Here is a sample request, showing the process for authenticating using your API Key:
# With cURL, you can just pass the "username" and "password" with each request
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms.json"
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
echo htmlentities($response);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
# Using urllib2 we'll need an HTTPPasswordMgr and HTTPBasicAuthHandler
import urllib2
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
# Create a password manager
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
# Add the username and password (API key and nonsense value)
password_manager.add_password(None, base_url, username, password)
# Create the AuthHandler
handler = urllib2.HTTPBasicAuthHandler(password_manager)
# Create and install an opener using the AuthHandler
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
# Now each request we make will be authenticated
response = urllib2.urlopen(base_url+'forms.json')
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms.json")
# Set up our request using the desired endpoint, and configure the basic auth
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
# Make our request using https
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
# Print the output in a "pretty" json format
puts JSON.pretty_generate(JSON[response.body])
//With Node, we'll use the `request` library. If you don't have it already, you can get it with `npm install request`
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
Make sure to replace
AOI6-LFKL-VM1Q-IEX9
with your API key andfishbowl
with your own subdomain. The second valuefootastic
can be set to anything (we don’t check the content).
Wufoo uses Basic Auth with API Keys to allow access to the API.
Wufoo expects the API key to be included as the 'username’ and any value as the 'password’ portion of Basic Auth. If the service you’re using doesn’t have a built in way to authenticate using Basic Auth, you can set the Authorization header to a base64 encoded string:
base64('username:password')
After encoding, you can set the header like this:
Authorization: Basic QU9JNi1MRktMLVZNMVEtSUVYOTpmb290YXN0aWM=
Forms
All Forms
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'forms.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Forms" : [
{
"Name" : "Api Submit Example",
"Description" : "This is my form. Please fill it out. It's awesome!",
"RedirectMessage" : "Success! Thanks for filling out my form!",
"Url" : "api-submit-example",
"Email" : "",
"IsPublic" : "1",
"Language" : "english",
"StartDate" : "2000-01-01 12:00:00",
"EndDate" : "2030-01-01 12:00:00",
"EntryLimit" : "0",
"DateCreated" : "2010-07-07 14:51:14",
"DateUpdated" : "2010-07-07 14:51:14",
"Hash" : "psy5irt0bq4brj",
"LinkFields" : "https://fishbowl.wufoo.com/api/v3/forms/psy5irt0bq4brj/fields.json?pretty=true",
"LinkEntries" : "https://fishbowl.wufoo.com/api/v3/forms/psy5irt0bq4brj/entries.json?pretty=true",
"LinkEntriesCount" : "https://fishbowl.wufoo.com/api/v3/forms/psy5irt0bq4brj/entries/count.json?pretty=true"
},
...
{
"Name" : "Tiny Form",
"Description" : "This is my form. Please fill it out. It's awesome!",
"RedirectMessage" : "Great! Thanks for filling out my form!",
"Url" : "tiny-form",
"Email" : "",
"IsPublic" : "1",
"Language" : "english",
"StartDate" : "2000-01-01 12:00:00",
"EndDate" : "2030-01-01 12:00:00",
"EntryLimit" : "0",
"DateCreated" : "2012-02-22 15:35:33",
"DateUpdated" : "2012-02-22 15:35:33",
"Hash" : "kvikd1a1n54u3f",
"LinkFields" : "https://fishbowl.wufoo.com/api/v3/forms/kvikd1a1n54u3f/fields.json?pretty=true",
"LinkEntries" : "https://fishbowl.wufoo.com/api/v3/forms/kvikd1a1n54u3f/entries.json?pretty=true",
"LinkEntriesCount" : "https://fishbowl.wufoo.com/api/v3/forms/kvikd1a1n54u3f/entries/count.json?pretty=true"
},
{
"Name" : "Wufoo API Example",
"Description" : "This is my form. Please fill it out. It's awesome!",
"RedirectMessage" : "Success! Thanks for filling out my form!",
"Url" : "wufoo-api-example",
"Email" : "",
"IsPublic" : "1",
"Language" : "english",
"StartDate" : "2000-01-01 12:00:00",
"EndDate" : "2030-01-01 12:00:00",
"EntryLimit" : "0",
"DateCreated" : "0000-00-00 00:00:00",
"DateUpdated" : "0000-00-00 00:00:00",
"Hash" : "s1afea8b1vk0jf7",
"LinkFields" : "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/fields.json?pretty=true",
"LinkEntries" : "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json?pretty=true",
"LinkEntriesCount" : "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries/count.json?pretty=true"
}
]
}
This request returns details on all the forms you have permission to access.
HTTP Request
GET https://{subdomain}.wufoo.com/api/v3/forms.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either ‘json’ or 'xml’ is required. This will determine response format |
Query Parameters
Parameter | Default | Description |
---|---|---|
includeTodayCount | false | If set to true, includes the number of entries received today |
pretty | false | If set to true, returns the result in a “pretty print” format |
If you add the includeTodayCount
parameter, the value will be returned in the form’s EntryCountToday
property
Each Form will be displayed as a separate object made up of these properties:
Property | Description |
---|---|
Name | The title of the form specified in Form Settings |
Description | The description of the form as specified in the Form Settings |
Redirect Message | The Confirmation message shown to users after they submit an entry |
Url | This is the “easy to remember” URL used for the form. Since it changes when the form title is changed, we recommend using the hashed URL instead when you need a permanent link. This hash can be used as a form identifier in other requests |
A list of the email addresses that are set to receive Notification emails in the Notification Settings | |
IsPublic | Indicates whether or not the Public option is enabled, allowing anyone with the link to access the form. Possible values are: 1 = true, 0 = false |
Language | Indicates the language set for this account in the Form Settings |
StartDate | The date/time the form will be accessible through the public URL |
EndDate | The date/time the form will no longer be accessible through the public URL |
EntryLimit | The maximum number of entries this form will accept before it is no longer accessible through the public URL |
DateCreated | A timestamp of when the form was created. For a duplicated form, this will be the DateCreated for the original form |
DateUpdated | A timestamp of when the form was lasted edited in the Wufoo Form Builder. For duplicated forms, the original value will also be copied from the original form |
Hash | A permanent, hashed value unique to this form on this user’s account. Can be used as a form identifier in other requests |
LinkFields | Reference URL for a list of this form’s fields |
LinkEntries | Reference URL for a list of entries stored by this form |
LinkEntriesCount | Reference URL for a count of the entries stored by this form |
Form
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Forms": [
{
"Name": "Wufoo API Example",
"Description": "This is my form. Please fill it out. It's awesome!",
"RedirectMessage": "Success! Thanks for filling out my form!",
"Url": "wufoo-api-example",
"Email": "",
"IsPublic": "1",
"Language": "english",
"StartDate": "2000-01-01 12:00:00",
"EndDate": "2030-01-01 12:00:00",
"EntryLimit": "0",
"DateCreated": "0000-00-00 00:00:00",
"DateUpdated": "0000-00-00 00:00:00",
"Hash": "s1afea8b1vk0jf7",
"LinkFields": "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/fields.json",
"LinkEntries": "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json",
"LinkEntriesCount": "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries/count.json"
}
]
}
This request returns a specific form. To identify the desired form, you can either use the form hash or the form title.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/forms/{identifier}.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
includeTodayCount | false | If set to true, includes the number of entries received today |
pretty | false | If set to true, returns the result in a “pretty print” format |
The Form properties are the same as in the All Forms request. The only difference is that this request will only return the identified form.
Form Fields
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/fields.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7/fields.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/fields.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/fields.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/fields.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Fields": [
{
"Title": "Entry Id",
"Type": "text",
"ID": "EntryId"
},
{
"Title": "Single Line Text",
"Instructions": "",
"IsRequired": "1",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "text",
"ID": "Field105"
},
{
"Title": "Number",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "number",
"ID": "Field106"
},
{
"Title": "Paragraph",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "textarea",
"ID": "Field107"
},
This request returns the field structure for a specific form.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/fields.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
system | false | If set to true, includes additional metadata fields |
pretty | false | If set to true, returns the result in a “pretty print” format |
Most of the properties for a Field object match the options set in your Field Settings. Here are a few:
Property | Description |
---|---|
Title | The Field Label. |
Instructions | The Instructions for User (if any). |
IsRequired | Whether or not the field has been marked as Required in the Field Settings. This value can be 1 = true or 0 = false |
ClassNames | Any values that were added to the CSS Keywords option in the Form Builder. |
ID | The API ID for that field. This is what you’ll use for submitting new entries, or using URL Modification and Templating |
Label | If a field has a SubFields or Choices property (meaning there are multiple fields or options), each sub-field or choice will have its own label. This is the value stored for Dropdown, Multiple Choice, or Checkbox fields. For fields like Name and Address, these are the values of the different sub-fields |
DefaultVal | If the field has a Predefined Value set in the Field Settings, it will be displayed here. Otherwise, the value will be “0” |
Page | Indicates which page of the form the field is added to. On a single page form (no Page Breaks) all fields will be on Page 1 |
Checkbox Fields
Checkbox fields will have SubFields property that is an array of all the field options. Each SubField element also has it’s own ID. This is what allows you to “check” more than one option.
Checkbox Example
{
"Title": "Checkbox",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "0",
"Page": "1",
"SubFields": [
{
"DefaultVal": "0",
"ID": "Field108",
"Label": "Check One"
},
{
"DefaultVal": "0",
"ID": "Field109",
"Label": "Check Two"
},
{
"DefaultVal": "0",
"ID": "Field110",
"Label": "Check Three"
}
],
"Type": "checkbox",
"ID": "Field108"
},
Multiple Choice Fields
Multiple Choice fields have a Choices property that is an array of all options. Multiple Choice fields have a HasOtherField
property, this value is either true or false and is only set if the “Allow Other” option was enabled in the Field Settings. When the HasOtherField is true, the last choice is the “other” field.
Multiple Choice Field Example
{
"Title": "Multiple Choice",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Choices": [
{
"Label": "MC One"
},
{
"Label": "MC Two"
},
{
"Label": "MC Three"
}
],
"Type": "radio",
"ID": "Field208",
"HasOtherField": false
},
Dropdown Fields
Dropdown fields also have a Choices property with an array of all options. Dropdown fields have the HasOtherField
property as well, but they can’t actually use the “Allow Other” option like Multiple Choice fields.
Dropdown Field Example
{
"Title": "Dropdown",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Choices": [
{
"Label": ""
},
{
"Label": "Dropdown One"
},
{
"Label": "Dropdown Two"
},
{
"Label": "Dropdown Three"
}
],
"Type": "select",
"ID": "Field209",
"HasOtherField": false
},
{
"Title": "Name",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"SubFields": [
{
"DefaultVal": "",
"ID": "Field1",
"Label": "First"
},
{
"DefaultVal": "",
"ID": "Field2",
"Label": "Last"
}
],
"Type": "shortname",
"ID": "Field1"
},
{
"Title": "File Upload",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "file",
"ID": "Field210"
},
Address Fields
Address fields have a SubFields property with one element for each part of the address.
Address Field Example
{
"Title": "Address",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"SubFields": [
{
"DefaultVal": "",
"ID": "Field211",
"Label": "Street Address"
},
{
"DefaultVal": "",
"ID": "Field212",
"Label": "Address Line 2"
},
{
"DefaultVal": "",
"ID": "Field213",
"Label": "City"
},
{
"DefaultVal": "",
"ID": "Field214",
"Label": "State / Province / Region"
},
{
"DefaultVal": "",
"ID": "Field215",
"Label": "Postal / Zip Code"
},
{
"DefaultVal": "",
"ID": "Field216",
"Label": "Country"
}
],
"Type": "address",
"ID": "Field211"
},
{
"Title": "Date",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "date",
"ID": "Field217"
},
{
"Title": "Email",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "email",
"ID": "Field218"
},
{
"Title": "Time",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "time",
"ID": "Field219"
},
{
"Title": "Phone Number",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "phone",
"ID": "Field220"
},
{
"Title": "Website",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "url",
"ID": "Field221"
},
{
"Title": "Price",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "money",
"ID": "Field222"
},
Likert Fields
Likert fields have a SubFields
property for the “rows” and a Choices
property for the “columns”. Each choice also has a Score property, representing that choice’s “value” relative to the other choices. If the Not Applicable option is enabled in the Field Settings, there will be an additional Choice with a score of 0.
Likert Fields Example
{
"Title": "Likert",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "0",
"Page": "1",
"SubFields": [
{
"DefaultVal": "0",
"ID": "Field4",
"Label": "Wufoo is Fun"
},
{
"DefaultVal": "0",
"ID": "Field5",
"Label": "Wufoo Is Pretty"
},
{
"DefaultVal": "0",
"ID": "Field6",
"Label": "Wufoo is Your Friend"
}
],
"Choices": [
{
"Score": 1,
"Label": "Strongly Disagree"
},
{
"Score": 2,
"Label": "Disagree"
},
{
"Score": 3,
"Label": "Agree"
},
{
"Score": 4,
"Label": "Strongly Agree"
}
],
"Type": "likert",
"ID": "Field4",
"HasOtherField": false
},
Rating Field Example
{
"Title": "Rating",
"Instructions": "",
"IsRequired": "0",
"ClassNames": "",
"DefaultVal": "",
"Page": "1",
"Type": "rating",
"ID": "Field223"
},
Default Metadata Fields
{
"Title": "Date Created",
"Type": "date",
"ID": "DateCreated"
},
{
"Title": "Created By",
"Type": "text",
"ID": "CreatedBy"
},
{
"Title": "Last Updated",
"Type": "date",
"ID": "LastUpdated"
},
{
"Title": "Updated By",
"Type": "text",
"ID": "UpdatedBy"
}
]
}
System Fields
{
"Title":"Payment Status",
"IsSystem":true,
"Type":"text",
"ID":"Status"
},
{
"Title":"Payment Total",
"IsSystem":true,
"Type":"text",
"ID":"PurchaseTotal"
},
{
"Title":"Payment Currency",
"IsSystem":true,
"Type":"text",
"ID":"Currency"
},
{
"Title":"Payment Confirmation",
"IsSystem":true,
"Type":"text",
"ID":"TransactionId"
},
{
"Title":"Payment Merchant",
"IsSystem":true,
"Type":"text",
"ID":"MerchantType"
},
{
"Title":"IP Address",
"IsSystem":true,
"Type":"text",
"ID":"IP"
},
{
"Title":"Last Page Accessed",
"IsSystem":true,
"Type":"text",
"ID":"LastPage"
},
{
"Title":"Completion Status",
"IsSystem":true,
"Type":"text",
"ID":"CompleteSubmission"
}
System Fields
These are only included if you set the system
query parameter.
If you set system
to any value (system=true
, system=false
, etc), the fields will be included, so if you don’t want the System Fields, leave the system
parameter out (Don’t just set it to false
). This parameter is also available in the Entries API
The System Fields are:
Field | Description |
---|---|
IP | The IP Address of the user submitting the form. |
LastPage | This represents the last page the user submitted. |
CompleteSubmission | Represents either a completed (1 ) or incomplete/partial (0 ) entry. |
Status | Indicates the payment status. An example is ‘Paid’. More info here |
PurchaseTotal | The total amount charged for the transaction. This is the final total we send to the payment processor |
Currency | The currency used. This is the currency value we send to the payment processor |
TransactionId | The confirmation number sent back from the payment processor. |
MerchantType | The name of the payment processor used. This is determined by which payment integration is set up. There is a full list here |
Form Comments
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/comments.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7/comments.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/comments.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/comments.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/comments.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Comments" : [
{
"CommentId" : "4",
"EntryId" : "6",
"Text" : "Here's another comment",
"CommentedBy" : "fishbowl",
"DateCreated" : "2015-04-20 15:37:56"
},
{
"CommentId" : "2",
"EntryId" : "8",
"Text" : "Test Comment",
"CommentedBy" : "fishbowl",
"DateCreated" : "2015-04-20 15:37:42"
},
{
"CommentId" : "3",
"EntryId" : "8",
"Text" : "Another Comment",
"CommentedBy" : "fishbowl",
"DateCreated" : "2015-04-20 15:37:47"
}
]
}
Comments on Form Entries
This request returns any comments made on this form’s entries in the Entry Manager
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/comments.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
entryId | N/A | If set to a number, will only return comments for the specific entry |
pageStart | 0 | The comment that the request will start from |
pageSize | 25 | The number of comments returned in the request (Maximum of 100) |
Here are the properties of each Comment:
Property | Description |
---|---|
CommentId | A unique ID for this comment. |
CommentedBy | The name of the person who commented on this entry. |
DateCreated | The date on which the comment was made. |
EntryId | Is the unique ID of the entry to which this comment is associated. |
Text | The comment itself. |
Comments Count
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/comments/count.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7/comments/count.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/comments/count.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/comments/count.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/comments/count.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Count" : 3
}
This request returns a count of all comments made on this form’s entries
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/comments/count.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
Entries
Form Entries
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/wufoo-api-example/entries.json?sort=EntryId&sortDirection=DESC"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7/entries.json?sort=EntryId&sortDirection=DESC')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/entries.json?sort=EntryId&sortDirection=DESC")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json?sort=EntryId&sortDirection=DESC",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json?sort=EntryId&sortDirection=DESC');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Entries" : [
{
"EntryId" : "9",
"Field105" : "Some Text",
"Field106" : "123",
"Field107" : "Here is a Paragraph field. It can hold more text than a regular Single Line Text field. \r\nThis is a second line of text in the same field.",
"Field108" : "Check One",
"Field109" : "Check Two",
"Field110" : "Check Three",
"Field208" : "MC Two",
"Field209" : "Dropdown Three",
"Field1" : "Wufoo",
"Field2" : "Test",
"Field210" : "test.txt (https://fishbowl.wufoo.com/cabinet/s1afea8b1vk0jf7/gTVeAerMQyk%3D/test.txt)",
"Field211" : "123 Street",
"Field212" : "",
"Field213" : "City",
"Field214" : "CA",
"Field215" : "12445",
"Field216" : "United States",
"Field217" : "2015-04-20",
"Field218" : "test@wufoo.com",
"Field219" : "00:34:56",
"Field220" : "1231231234",
"Field221" : "http://www.wufoo.com",
"Field222" : "100.99",
"Field4" : "Strongly Agree",
"Field5" : "Agree",
"Field6" : "Strongly Agree",
"Field223" : "5",
"DateCreated" : "2015-04-20 15:50:34",
"CreatedBy" : "public",
"DateUpdated" : "",
"UpdatedBy" : null
},
...
{
"EntryId" : "2",
"Field105" : "",
"Field106" : "",
"Field107" : "",
"Field108" : "",
"Field109" : "",
"Field110" : "",
"Field208" : "",
"Field209" : "",
"Field1" : "Amber",
"Field2" : "Des",
"Field210" : "",
"Field211" : "",
"Field212" : "",
"Field213" : "",
"Field214" : "",
"Field215" : "",
"Field216" : "",
"Field217" : "",
"Field218" : "",
"Field219" : "",
"Field220" : "",
"Field221" : "",
"Field222" : null,
"Field4" : "Agree",
"Field5" : "Agree",
"Field6" : "Disagree",
"Field223" : "",
"DateCreated" : "2008-11-24 09:46:04",
"CreatedBy" : "public",
"DateUpdated" : "",
"UpdatedBy" : null
},
{
"EntryId" : "1",
"Field105" : "",
"Field106" : "",
"Field107" : "",
"Field108" : "",
"Field109" : "",
"Field110" : "",
"Field208" : "",
"Field209" : "",
"Field1" : "Tim",
"Field2" : "Sabat",
"Field210" : "",
"Field211" : "",
"Field212" : "",
"Field213" : "",
"Field214" : "",
"Field215" : "",
"Field216" : "",
"Field217" : "",
"Field218" : "",
"Field219" : "",
"Field220" : "",
"Field221" : "",
"Field222" : null,
"Field4" : "Strongly Agree",
"Field5" : "Strongly Agree",
"Field6" : "Agree",
"Field223" : "",
"DateCreated" : "2008-11-24 09:45:28",
"CreatedBy" : "public",
"DateUpdated" : "",
"UpdatedBy" : null
}
]
}
This request returns the entries that have been submitted to a specific form. This is the equivalent of viewing your stored entries in the Entry Manager in Wufoo.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/entries.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either ‘json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
system | false | If set to true, includes additional metadata fields |
pretty | false | If set to true, returns the result in a “pretty print” format |
pageStart | 0 | The entry that the request will start from |
pageSize | 25 | The number of entries returned in the request (Maximum of 100) |
The various Field##
properties correspond to the fields in the Form Fields
Every Entry in an Entries request contains five fields. The Default Fields are:
Field | Description |
---|---|
EntryId | This value is the unique identifier for your entry. |
DateCreated | The date that this entry was submitted. The date/time will be recorded in the timezone of the user making the request |
Created By | The person who created the entry. If submitted through a form, the value here will be public. If the submission originated in the Entry Manager this value will be the user name of the submitting user. |
DateUpdated | The date that this entry was edited through the Entry Manager. If the submission has never been updated, this value will be blank. |
UpdatedBy | The user name of the person who updated the entry in the Entry Manager will appear in this element. |
If you add the system
query parameter, some additional metadata fields will be included. The System Fields are:
Field | Description |
---|---|
IP | The IP Address of the user submitting the form. |
LastPage | This represents the last page the user submitted. |
CompleteSubmission | Represents either a completed (1 ) or incomplete/partial (0 ) entry. |
Status | Indicates the payment status. An example is ‘Paid’. More info here |
PurchaseTotal | The total amount charged for the transaction. This is the final total we send to the payment processor |
Currency | The currency used. This is the currency value we send to the payment processor |
TransactionId | The confirmation number sent back from the payment processor. |
MerchantType | The name of the payment processor used. This is determined by which payment integration is set up. There is a full list here |
Filtering
You can filter an Entries API request, similar to how the Wufoo Entry Manager works. Here’s the format:
Filter{##}={ID}+{Operator}+{Value}&match={Grouping}
Parameter | Description |
---|---|
Filter{##} | {##} should just be a unique number to identify each filter (1, 2, 3, etc.) |
{ID} | The API Field ID for the field you want to use. These values are the same as the “ID” property in a Fields request |
{Operator} | The comparison that will be used with the filter. See full list below. |
{Value} | The value to match with your filter |
{Grouping} | Allows you group your filters as 'AND’ (all must match) or 'OR’ (at least one must match) |
Here’s an example:
https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json?Filter1=EntryId+Is_greater_than+1&Filter2=EntryId+Is_less_than+5&match=AND
Valid Operators
- Contains
- Does_not_contain
- Begins_with
- Ends_with
- Is_less_than
- Is_greater_than
- Is_on
- Is_before
- Is_after
- Is_not_equal_to
- Is_equal_to
- Is_not_NULL
To filter by a specific date/time, you can use the MySQL DateTime format. This would be written as “YYYY-MM-DD HH:MM:SS” For example:2009-08-13 11:43:22
These times can be entered in PST/PDT (UTC -8/-7)
Sorting
Sorting can also be applied using additional query parameters in this format:
sort={ID}&sortDirection={DESC|ASC}
Parameter | Default | Description |
---|---|---|
sort | N/A | The API Field ID for the field you want to use. These values are the same as the “ID” property in a Fields request |
sortDirection | ASC | The order to sort returned entries: ASC (lowest to highest) or DESC (highest to lowest) |
The sortDirection
parameter will only be applied if it is also used with a sort
parameter. In other words, the sortDirection
can only be applied to the sorting used with the sort
value, not by itself.
Example:
https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json?sort=EntryId&sortDirection=DESC
Paging
As mentioned above, you can use the pageStart
and pageSize
parameters to change the number of entries returned in your request. For example:
pageStart=5&pageSize=10
would give you 10 entries, starting after the first 5. In other words, entries 6-15
Query Parameters
Parameter | Default | Description |
---|---|---|
pageStart | 0 | The entry that the request will start from |
pageSize | 25 | The number of entries returned in the request (Maximum of 100) |
Form Entries Count
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries/count.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7/entries/count.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/entries/count.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries/count.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries/count.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"EntryCount" : "8"
}
HTTP Request
This request returns a count of the entries stored for a specific form. This can help with deciding on a pageSize for your Entries requests, or determining the number of elements you have to display. This request can also be used with filters, in which case the count will be all entries matching the filter.
GET http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/entries/count.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
Submit Entry
curl -X POST -d "Field1=Wufoo" -d "Field2=Test" -d "Field105=API-Test" -d "Field106=42" -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json"
import urllib
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
values = {
'Field1' : 'Wufoo',
'Field2' : 'Test',
'Field105' : 'API-Test',
'Field106' : '42'
}
post_data = urllib.urlencode(values)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7/entries.json', post_data)
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/entries.json")
request = Net::HTTP::Post.new(uri.request_uri)
request.basic_auth(username, password)
request.set_form_data('Field1' => 'Wufoo',
'Field2' => 'Test',
'Field105' => 'API-Test',
'Field106' => '42'
)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json",
method: "POST",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
},
form: {
'Field1' : 'Wufoo',
'Field2' : 'Test',
'Field105' : 'API-Test',
'Field106' : '42'
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'Field1=Wufoo&Field2=Test&Field105=API-Test&Field106=42');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 201) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request will receive a response in this format:
{
"Success": 1,
"EntryId": 10,
"EntryLink": "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json?Filter1=EntryId+Is_equal_to+10",
"RedirectUrl":"http://wufoo.com"
}
This request allows you to submit a new entry to a specific form.
HTTP Request
POST http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/entries.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
POST Parameters
To submit an entry to a form, you’ll need to match the API ID values for each field in the form. You can find these values through a Form Fields request, or through your form’s API Information page.
The POST request should contain the data for the new entry submission in key/value pairs. The key will be the API ID in the format of Field##
, where ##
is the API ID for the given field. The value will be your desired entry data, which will be recorded as if a user had submitted that value on the form manually.
Here’s an example of what the key/value pairs might look like:
{
"Field1": "Wufoo",
"Field2": "Test",
"Field105": "API-Test",
"Field106": "42"
}
Response
When you make the Entries POST, you’ll receive a PostResponse object containing the following:
Property | Description |
---|---|
Success | Will be '1’ if the submission was a success. If the submission failed, it will be '0’ |
EntryId | If the submission was a success, this value will be the EntryId assigned to this submission |
EntryLink | If the submission was a success, this value will be the URL for an Entries request, filtered for this entry |
RedirectUrl | If the form has a Redirect set up, that URL will be included in the response |
Failed Submissions
Rate Limit
This example shows the server response when the submit entry rate limit is exceeded
{
"Text":"Slow Down",
"HTTPCode":429
}
To prevent malicious bot activity and reduce strain on Wufoo services, entries submitted via the Wufoo v3 API are limited to 50 submissions per Wufoo User in a 5 minute sliding window. Entries which exceed this limit will receive a HTTP 429 response. For more information on this and other Wufoo HTTP Status Codes see here.
Note this POST request is missing a value for Field105 (a required Text field) and has a text value submitted for Field106 (a Number field)
curl -X POST -d "Field1=Wufoo" -d "Field2=Test" -d "Field106=test" -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json"
import urllib
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
values = {
'Field1' : 'Wufoo',
'Field2' : 'Test',
'Field106' : 'Fail'
}
post_data = urllib.urlencode(values)
response = urllib2.urlopen(base_url+'forms/s1afea8b1vk0jf7/entries.json', post_data)
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/entries.json")
request = Net::HTTP::Post.new(uri.request_uri)
request.basic_auth(username, password)
request.set_form_data('Field1' => 'Wufoo',
'Field2' => 'Test',
'Field106' => 'Fail'
)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json",
method: "POST",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
},
form: {
'Field1' : 'Wufoo',
'Field2' : 'Test',
'Field106' : 'Fail'
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/entries.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'Field1=Wufoo&Field2=Test&&Field106=Fail');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200 || $resultStatus['http_code'] == 201) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
Here is the corresponding “failed” PostResponse
{
"RedirectUrl":"http://wufoo.com",
"Success":0,
"ErrorText":"Errors have been <b>highlighted<\/b> below.",
"FieldErrors":[
{
"ID":"Field105",
"ErrorText":"This field is required. Please enter a value."
},
{
"ID":"Field106",
"ErrorText":"Please enter a numeric value."
}
]
}
Bad Request
An Entries POST can fail for a few different reasons. A submission through the API must still adhere to any field validation or form activity limits. If these are not respected, the PostResponse will return with a 'Success’ value of '0’. In this case, the PostResponse will contain some alternate properties:
Property | Description |
---|---|
Success | Will be '0’ if the submission failed. |
ErrorText | This is some general text related to the error. Equivalent to what would be shown to the user on the actual form |
FieldErrors | This will be an array of ID and ErrorText pairs for each affected field. These would be any error displayed on the field itself |
RedirectUrl | If the form has a Redirect set up, that URL will be included in the response |
Reports
All Reports
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/reports.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'reports.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"reports.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/reports.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/reports.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Reports" : [
{
"Name" : "Colors",
"IsPublic" : "0",
"Url" : "colors",
"Description" : null,
"DateCreated" : "0000-00-00 00:00:00",
"DateUpdated" : "0000-00-00 00:00:00",
"Hash" : "mbrtcpw036ecgn",
"LinkFields" : "https://fishbowl.wufoo.com/api/v3/reports/mbrtcpw036ecgn/fields.json?pretty=true",
"LinkEntries" : "https://fishbowl.wufoo.com/api/v3/reports/mbrtcpw036ecgn/entries.json?pretty=true",
"LinkEntriesCount" : "https://fishbowl.wufoo.com/api/v3/reports/mbrtcpw036ecgn/entries/count.json?pretty=true",
"LinkWidgets" : "https://fishbowl.wufoo.com/api/v3/reports/mbrtcpw036ecgn/widgets.json?pretty=true"
},
{
"Name" : "Example Report",
"IsPublic" : "0",
"Url" : "example-report",
"Description" : "This is my report. View it in all its glory!",
"DateCreated" : "2015-04-21 11:02:04",
"DateUpdated" : "2015-04-21 11:02:04",
"Hash" : "qa4d98l1ib9or7",
"LinkFields" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/fields.json?pretty=true",
"LinkEntries" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries.json?pretty=true",
"LinkEntriesCount" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries/count.json?pretty=true",
"LinkWidgets" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/widgets.json?pretty=true"
},
{
"Name" : "Names",
"IsPublic" : "1",
"Url" : "names",
"Description" : null,
"DateCreated" : "0000-00-00 00:00:00",
"DateUpdated" : "0000-00-00 00:00:00",
"Hash" : "z1qlusp218ylc12",
"LinkFields" : "https://fishbowl.wufoo.com/api/v3/reports/z1qlusp218ylc12/fields.json?pretty=true",
"LinkEntries" : "https://fishbowl.wufoo.com/api/v3/reports/z1qlusp218ylc12/entries.json?pretty=true",
"LinkEntriesCount" : "https://fishbowl.wufoo.com/api/v3/reports/z1qlusp218ylc12/entries/count.json?pretty=true",
"LinkWidgets" : "https://fishbowl.wufoo.com/api/v3/reports/z1qlusp218ylc12/widgets.json?pretty=true"
}
]
}
This request returns details on all the reports you have permission to access.
HTTP Request
GET https://{subdomain}.wufoo.com/api/v3/reports.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either ‘json’ or 'xml’ is required. This will determine response format |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
Each Report will be displayed as a separate object made up of these properties:
Property | Description |
---|---|
Name | The title of the report specified in the Report Builder |
Description | The description of the report as specified in the Report Builder |
Url | This is the “easy to remember” URL used for the report. Since it changes when the report title is changed, we recommend using the “hashed” URL instead when you need a permanent link. Can be used as a report identifier in other requests |
IsPublic | Indicates whether or not the “Public” option is enabled, allowing anyone with the link to access the report. Possible values are: 1 = true, 0 = false |
DateCreated | A timestamp of when the report was created. For a duplicated report, this will be the DateCreated for the original report |
DateUpdated | A timestamp of when the report was lasted edited in the Wufoo Report Builder |
Hash | A permanent, “hashed” value unique to this report on this user’s account. Can be used as a report identifier in other requests |
LinkFields | Link to the Report Fields API for a list of this report’s fields |
LinkEntries | Link to the Report Entries API for a list of entries stored by this report |
LinkEntriesCount | Link to the Report Entries API for a count of the entries stored by this report |
LinkWidgets | Link to the Widgets API for the widgets that make up this report |
Report
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'reports/qa4d98l1ib9or7.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"reports/qa4d98l1ib9or7.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Reports" : [
{
"Name" : "Example Report",
"IsPublic" : "0",
"Url" : "example-report",
"Description" : "This is my report. View it in all its glory!",
"DateCreated" : "2015-04-21 11:02:04",
"DateUpdated" : "2015-04-21 11:02:04",
"Hash" : "qa4d98l1ib9or7",
"LinkFields" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/fields.json?pretty=true",
"LinkEntries" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries.json?pretty=true",
"LinkEntriesCount" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries/count.json?pretty=true",
"LinkWidgets" : "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/widgets.json?pretty=true"
}
]
}
This request returns a specific report. To identify the desired report, you can either use the report hash or the report title.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/reports/{identifier}.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the report to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
The Report properties are the same as in the All Reporst request. The only difference is that this request will only return the identified report.
Report Entries
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'reports/qa4d98l1ib9or7/entries.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"reports/qa4d98l1ib9or7/entries.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Entries" : [
{
"EntryId" : "1",
"Field105" : "",
"Field106" : "",
"Field107" : "",
"Field108" : "",
"Field208" : "",
"Field209" : "",
"Field1" : "Tim",
"Field210" : "",
"Field211" : "",
"Field217" : "",
"DateCreated" : "2008-11-24 09:45:28"
},
{
"EntryId" : "2",
"Field105" : "",
"Field106" : "",
"Field107" : "",
"Field108" : "",
"Field208" : "",
"Field209" : "",
"Field1" : "Amber",
"Field210" : "",
"Field211" : "",
"Field217" : "",
"DateCreated" : "2008-11-24 09:46:04"
},
...
{
"EntryId" : "9",
"Field105" : "Some Text",
"Field106" : "123",
"Field107" : "Here is a Paragraph field. It can hold more text than a regular Single Line Text field. \r\nThis is a second line of text in the same field.",
"Field108" : "Check One",
"Field208" : "MC Two",
"Field209" : "Dropdown Three",
"Field1" : "Wufoo",
"Field210" : "test.txt (https://fishbowl.wufoo.com/cabinet/s1afea8b1vk0jf7/gTVeAerMQyk%3D/test.txt)",
"Field211" : "123 Street",
"Field217" : "2015-04-20",
"DateCreated" : "2015-04-20 15:50:34"
}
]
}
This request returns the entries that make up a specific report.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/reports/{identifier}/entries.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
system | false | If set to true, includes additional metadata fields |
pretty | false | If set to true, returns the result in a “pretty print” format |
This is essentially an equivalent of the data that would show up in a datagrid widget on the report, or in an exported copy of the report entry data
Report Entries Count
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries/count.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'reports/qa4d98l1ib9or7/entries/count.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"reports/qa4d98l1ib9or7/entries/count.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries/count.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/entries/count.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"EntryCount" : "9"
}
This request returns a count of the entries stored for a specific report. This can help with determining the number of elements you have to display.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/reports/{identifier}/entries/count.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
Report Fields
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/fields.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'reports/qa4d98l1ib9or7/fields.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"reports/qa4d98l1ib9or7/fields.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/fields.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/fields.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Fields" : [
{
"Title" : "Single Line Text",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "text",
"ID" : "Field105"
},
{
"Title" : "Number",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "number",
"ID" : "Field106"
},
{
"Title" : "Paragraph",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "textarea",
"ID" : "Field107"
},
{
"Title" : "Checkbox",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "0",
"Page" : "1",
"SubFields" : [
{
"DefaultVal" : "0",
"ID" : "Field108",
"Label" : "Check One"
},
{
"DefaultVal" : "0",
"ID" : "Field109",
"Label" : "Check Two"
},
{
"DefaultVal" : "0",
"ID" : "Field110",
"Label" : "Check Three"
}
],
"Type" : "checkbox",
"ID" : "Field108"
},
{
"Title" : "Multiple Choice",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Choices" : [
{
"Label" : "MC One"
},
{
"Label" : "MC Two"
},
{
"Label" : "MC Three"
}
],
"Type" : "radio",
"ID" : "Field208",
"HasOtherField" : false
},
{
"Title" : "Dropdown",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Choices" : [
{
"Label" : ""
},
{
"Label" : "Dropdown One"
},
{
"Label" : "Dropdown Two"
},
{
"Label" : "Dropdown Three"
}
],
"Type" : "select",
"ID" : "Field209",
"HasOtherField" : false
},
{
"Title" : "Name",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"SubFields" : [
{
"DefaultVal" : "",
"ID" : "Field1",
"Label" : "First"
},
{
"DefaultVal" : "",
"ID" : "Field2",
"Label" : "Last"
}
],
"Type" : "shortname",
"ID" : "Field1"
},
{
"Title" : "File Upload",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "file",
"ID" : "Field210"
},
{
"Title" : "Address",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"SubFields" : [
{
"DefaultVal" : "",
"ID" : "Field211",
"Label" : "Street Address"
},
{
"DefaultVal" : "",
"ID" : "Field212",
"Label" : "Address Line 2"
},
{
"DefaultVal" : "",
"ID" : "Field213",
"Label" : "City"
},
{
"DefaultVal" : "",
"ID" : "Field214",
"Label" : "State / Province / Region"
},
{
"DefaultVal" : "",
"ID" : "Field215",
"Label" : "Postal / Zip Code"
},
{
"DefaultVal" : "",
"ID" : "Field216",
"Label" : "Country"
}
],
"Type" : "address",
"ID" : "Field211"
},
{
"Title" : "Date",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "date",
"ID" : "Field217"
},
{
"Title" : "Email",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "email",
"ID" : "Field218"
},
{
"Title" : "Time",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "time",
"ID" : "Field219"
},
{
"Title" : "Phone Number",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "phone",
"ID" : "Field220"
},
{
"Title" : "Website",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "url",
"ID" : "Field221"
},
{
"Title" : "Amount",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "money",
"ID" : "Field222"
},
{
"Title" : "Rating",
"Instructions" : "",
"IsRequired" : "0",
"ClassNames" : "",
"DefaultVal" : "",
"Page" : "1",
"Type" : "rating",
"ID" : "Field223"
},
{
"Title" : "Date Created",
"Type" : "date",
"ID" : "DateCreated"
},
{
"Title" : "Last Updated",
"Type" : "date",
"ID" : "LastUpdated"
}
]
}
This request returns the field structure for the report’s corresponding form.
GET http://{subdomain}.wufoo.com/api/v3/reports/{identifier}/fields.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the report to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
system | false | If set to true, includes additional metadata fields |
pretty | false | If set to true, returns the result in a “pretty print” format |
Widgets
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/widgets.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'reports/qa4d98l1ib9or7/widgets.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"reports/qa4d98l1ib9or7/widgets.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/widgets.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/reports/qa4d98l1ib9or7/widgets.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Widgets" : [
{
"Name" : "Graph Widget",
"Size" : "small",
"Hash" : "jKyonpg4od1IeSBnJxqqc8n0N6kyD38YOofKjPwuslash5MI8=",
"Type" : "pie",
"TypeDesc" : "Pie Graph"
},
{
"Name" : "Chart Widget",
"Size" : "fill",
"Hash" : "Dv0H6fRnzFwuBeWzVLhJailsckhmKzVQVjFxPMGI7S4olI=",
"Type" : "fieldChart",
"TypeDesc" : "Chart"
},
{
"Name" : "Number Widget",
"Size" : "fill",
"Hash" : "krr7b7sEMLwuslashlfS8PVwuBe7wTk46plu7IwuBeUAZVWrR7qYhgA=",
"Type" : "bigNumber",
"TypeDesc" : "Number"
}
]
}
This request returns details of the widgets that make up a specific report. The hash code for a widget can be used to embed the widget using Javascript.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/reports/{identifier}/widgets.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
Only Chart, Graph, and Number widgets will be included in the request. Any Text or Datagrid widgets will not be shown. Each widget element will have the following properties:
Property | Description |
---|---|
Name | This is the name you chose when creating this widget in the Report Builder. |
Size | Graphs (pie, bar, line) can be small , medium or large . Charts (fieldChart) will have a size of fill because they always fill the container they are placed in. Big Numbers (bigNumber) will also have a size of fill because they are all one size. |
Type | The identifier for the widget type. Valid type values are fieldChart , bigNumber , bar , line , and pie . |
TypeDesc | A user-friendly version of the Widget type. |
Hash | An unchanging value representing this specific widget on this specific form. |
Example widget embed code:
<script type="text/javascript">
var host = (("https:" == document.location.protocol) ? "https://" : "http://");
document.write(unescape("%3Cscript src='" + host + "{subdomain}.wufoo.com/scripts/widget/embed.js?w={Hash}' type='text/javascript'%3E%3C/script%3E"));
</script>
Where {subdomain} is your account subdomain and {Hash} is your widget’s hash code
Users
Users
curl -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/users.json"
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
response = urllib2.urlopen(base_url+'users.json')
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"users.json")
request = Net::HTTP::Get.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/users.json",
method: "GET",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/users.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"Users" : [
{
"User" : "fishbowl",
"Email" : "fishbowl@wufoo.com",
"TimeZone" : "",
"Company" : "",
"IsAccountOwner" : "1",
"CreateForms" : "1",
"CreateReports" : "1",
"CreateThemes" : "1",
"AdminAccess" : "0",
"Image" : "boy_1",
"ApiKey" : "AOI6-LFKL-VM1Q-IEX9",
"LinkForms" : "https://fishbowl.wufoo.com/api/v3/forms.json?pretty=true",
"LinkReports" : "https://fishbowl.wufoo.com/api/v3/reports.json?pretty=true",
"Hash" : "b1fe5l920lqsh58",
"ImageUrlBig" : "https://wufoo.com/images/avatars/big/boy_1.png",
"ImageUrlSmall" : "https://wufoo.com/images/avatars/small/boy_1.png",
"HttpsEnabled" : "1"
},
{
"User" : "User With No Permissions",
"Email" : "fishy@wufoo.com",
"TimeZone" : "-12.00",
"Company" : "",
"IsAccountOwner" : "0",
"CreateForms" : "0",
"CreateReports" : "0",
"CreateThemes" : "0",
"AdminAccess" : "0",
"Image" : "animal_10",
"ApiKey" : "EL2P-RPCO-HD1W-SX96",
"LinkForms" : "https://fishbowl.wufoo.com/api/v3/forms.json?pretty=true",
"LinkReports" : "https://fishbowl.wufoo.com/api/v3/reports.json?pretty=true",
"Hash" : "k78jvgk0l2lbz7",
"ImageUrlBig" : "https://wufoo.com/images/avatars/big/animal_10.png",
"ImageUrlSmall" : "https://wufoo.com/images/avatars/small/animal_10.png",
"HttpsEnabled" : "1"
},
{
"User" : "Administrator",
"Email" : "test@wufoo.com",
"TimeZone" : "",
"Company" : "",
"IsAccountOwner" : "0",
"CreateForms" : "1",
"CreateReports" : "1",
"CreateThemes" : "1",
"AdminAccess" : "1",
"Image" : "doll_10",
"ApiKey" : "D71P-FARY-REB1-GN4W",
"LinkForms" : "https://fishbowl.wufoo.com/api/v3/forms.json?pretty=true",
"LinkReports" : "https://fishbowl.wufoo.com/api/v3/reports.json?pretty=true",
"Hash" : "n1ojkirv01rmc7h",
"ImageUrlBig" : "https://wufoo.com/images/avatars/big/doll_10.png",
"ImageUrlSmall" : "https://wufoo.com/images/avatars/small/doll_10.png",
"HttpsEnabled" : "1"
}
]
}
This request returns details of your account’s sub-users, including the API Key for each user.
HTTP Request
GET http://{subdomain}.wufoo.com/api/v3/users.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either ‘json’ or 'xml’ is required. This will determine response format |
Query Parameters
Parameter | Default | Description |
---|---|---|
pretty | false | If set to true, returns the result in a “pretty print” format |
Each user will have the following properties:
Property | Description |
---|---|
User | This is the name chosen when creating this user. |
The email address on file for this user. | |
Timezone | The offset from UTC used for certain account timestamps. |
Company | The company defined when this user was created. |
IsAccountOwner | Indicates whether the user is the Account Creator. If the user is AccountCreator, the Create(Forms/Reports/Themes) and AdminAccess values are ignored, as an AccountOwner has full rights to the account. Values can be 1 (yes) or 0 (no) |
CreateForms | Indicates whether or not this user may create forms. Values can be 1 (yes) or 0 (no) |
CreateReports | Binary value indicating whether or not this user may create reports. Values can be 1 (yes) or 0 (no) |
CreateThemes | Binary value indicating whether or not this user may create themes. Values can be 1 (yes) or 0 (no) |
AdminAccess | This indicates if the user has been designated as an Administrator. If a user has this permission, they may create forms/reports/themes and administer users. Values can be 1 (yes) or 0 (no) |
ApiKey | The authentication value used to make API requests for this account. Each API Key is restricted by that user’s permissions as set in the account’s Users tab |
Hash | An unchanging value representing the user on this account. |
ImageUrl | Links to the images used for the user’s avatar in Wufoo |
HttpsEnabled | No longer used, since all accounts can use HTTPS. All Wufoo forms now use HTTPS automatically, unless you decide to manually disable it through the link or embed code |
Webhooks
The Webhooks API allows you to add/delete Webhooks on your form, without requiring any manual setup. For example, Zapier uses this to set up a “Zap” in your forms, without you needing to make any changes.
Reducing the number of steps your user takes to connect your integration to Wufoo can help to increase conversion and decreases user frustration.
Add Webhook
curl -X PUT -d "url=https://www.wufoo.com" -d "handshakeKey=secret123" -d "metadata=true" -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/webhooks.json"
import urllib
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
values = {
'url' : 'https://www.wufoo.com',
'handshakeKey' : 'secret123',
'metadata' : 'true'
}
put_data = urllib.urlencode(values)
request = urllib2.Request(url=base_url+'forms/s1afea8b1vk0jf7/webhooks.json', data=put_data)
request.get_method = lambda: 'PUT'
response = urllib2.urlopen(request)
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/webhooks.json")
request = Net::HTTP::Put.new(uri.request_uri)
request.basic_auth(username, password)
request.set_form_data('url' => 'https://wufoo.com',
'handshakeKey' => 'secret123',
'metadata' => 'true'
)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/webhooks.json",
method: "PUT",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
},
form: {
'url' : 'https://www.wufoo.com',
'handshakeKey' : 'secret123',
'metadata' : 'true'
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/webhooks.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'url=https://www.wufoo.com&handshakeKey=secret123&metadata=true');
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'PUT');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200 || $resultStatus['http_code'] == 201) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request will recieve a response in this format:
{
"WebHookPutResult": {
"Hash": "h1elg2i41wauer1"
}
}
This request updates the Webhooks for a specific form. We only allow one Webhook per URL, so if there’s a request made for an existing URL, it will simply update, rather than duplicate the Webhook.
HTTP Request
PUT http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/webhooks.{format}
A PUT request is idempotent, which means that you may safely make this call multiple times with the same data. This prevents you from accidentally adding 10 of the same Webhook URLs to one form. For example:
- You make one PUT call to the Webhook API with the url
, metadata
, and handshakeKey
parameters
- Your user decides they want to use a new handshake key.
- You make a second API call with the same url
, but a new handshakeKey
, and the API will update the handshake key of the Webhook with that URL to the new handshakeKey
parameter.
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either ‘json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
PUT Parameters
Parameter | Default | Description |
---|---|---|
url | N/A | Required. This represents the URL that the Webhook will POST to when an entry is submitted. URL must be valid. |
handshakeKey | N/A | Optional. Sets the handshakeKey property. This can be used to help the recipient of the Webhooks ignore unwanted POSTs |
metadata | false | Optional. If set to true, the Webhook will include form/field structure data in each POST (required for some integrations) |
The Webhook PUT request will return a WebHookPutResult object, with a Hash
property: the newly created/updated Webhook’s “hash.” This is an unchanging value representing the Webhook on your form. It’s a good idea to save this value, because it acts as the Webhook identifier for a Webhook DELETE request, and you can’t retrieve it without making another request.
Delete Webhook
curl -X DELETE -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/webhooks/h1elg2i41wauer1.json"
import urllib
import urllib2
import json
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
request = urllib2.Request(url=base_url+'forms/s1afea8b1vk0jf7/webhooks/hap0e1c1x5rapc.json')
request.get_method = lambda: 'DELETE'
response = urllib2.urlopen(request)
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://fishbowl.wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"forms/s1afea8b1vk0jf7/webhooks/hw271p50lanp7l.json")
request = Net::HTTP::Delete.new(uri.request_uri)
request.basic_auth(username, password)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://fishbowl.wufoo.com/api/v3/forms/wb2xgwf0gskbda/webhooks/e1irzkhi0y6prja.json",
method: "DELETE",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://fishbowl.wufoo.com/api/v3/forms/s1afea8b1vk0jf7/webhooks/hjnuh251sepi2x.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200 || $resultStatus['http_code'] == 201) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request produces output in this format:
{
"WebHookDeleteResult":{
"Hash":"h1elg2i41wauer1"
}
}
This request allows you to remove a specific Webhook from a specific form.
HTTP Request
DELETE http://{subdomain}.wufoo.com/api/v3/forms/{identifier}/webhooks/{webhookHash}.{format}
URL Parameters
Parameter | Description |
---|---|
subdomain | Your account subdomain/username. |
format | Either 'json’ or 'xml’ is required. This will determine response format |
identifier | The title or hash of the form to retrieve |
webhookHash | The hash for the webhook you want to delete (Is returned in the initial PUT request response) |
The webhookHash identifier is the value that was returned from the Webhook PUT request that created the Webhook. If you don’t have this recorded, you’ll need to manually delete the Webhook, or make another PUT request with the same values. Upon a successful deletion, the WebHookDeleteResult object will be returned, with the same Hash
property as a PUT request.
Login
Retrieve API Key
The integrationKey and password values have been redacted. In an actual request, substitute your own key and the user’s password
curl -X POST -d "integrationKey=XXX" -d "email=fishbowl@wufoo.com" -d "password=XXX" -d "subdomain=fishbowl" -u "AOI6-LFKL-VM1Q-IEX9":"footastic" "https://wufoo.com/api/v3/login.json"
import urllib
import urllib2
import json
base_url = 'https://wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()
password_manager.add_password(None, base_url, username, password)
handler = urllib2.HTTPBasicAuthHandler(password_manager)
opener = urllib2.build_opener(handler)
urllib2.install_opener(opener)
values = {
'integrationKey' : 'XXX',
'email' : 'fishbowl@wufoo.com',
'password' : 'XXX',
'subdomain': 'fishbowl'
}
data = urllib.urlencode(values)
response = urllib2.urlopen(base_url+'login.json', data)
data = json.load(response)
print json.dumps(data, indent=4, sort_keys=True)
require "net/http"
require "uri"
require "json"
base_url = 'https://wufoo.com/api/v3/'
username = 'AOI6-LFKL-VM1Q-IEX9'
password = 'footastic'
uri = URI.parse(base_url+"login.json")
request = Net::HTTP::Post.new(uri.request_uri)
request.basic_auth(username, password)
request.set_form_data('integrationKey' => 'XXX',
'email' => 'fishbowl@wufoo.com',
'password' => 'XXX',
'subdomain' => 'fishbowl'
)
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => uri.scheme == 'https') {|http|
http.request(request)
}
puts JSON.pretty_generate(JSON[response.body])
var request = require("request");
request({
uri: "https://wufoo.com/api/v3/login.json",
method: "POST",
auth: {
'username': 'AOI6-LFKL-VM1Q-IEX9',
'password': 'footastic',
'sendImmediately': false
},
form: {
'integrationKey' : 'XXX',
'email' : 'fishbowl@wufoo.com',
'password' : 'XXX',
'subdomain' : 'fishbowl'
}
}, function(error, response, body) {
console.log(body);
});
<?php
$curl = curl_init('https://wufoo.com/api/v3/login.json');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'AOI6-LFKL-VM1Q-IEX9:footastic');
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_USERAGENT, 'Wufoo Sample Code');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'integrationKey=XXX&mail=fishbowl@wufoo.com&password=XXX&subdomain=fishbowl');
$response = curl_exec($curl);
$resultStatus = curl_getinfo($curl);
if($resultStatus['http_code'] == 200 || $resultStatus['http_code'] == 201) {
$json = json_decode($response);
echo json_encode($json, JSON_PRETTY_PRINT);
} else {
echo 'Call Failed '.print_r($resultStatus);
}
The above request will recieve a response in this format:
{
"ApiKey":"AOI6-LFKL-VM1Q-IEX9",
"UserLink":"https://fishbowl.wufoo.com/api/v3/users/b1fe5l920lqsh58.json",
"Subdomain":"fishbowl"
}
This request allows approved partners to access users API Keys. This is useful for custom integrations that need to make API requests on behalf of Wufoo users. For example, Zapier uses this method to set up new integrations, without requiring users to use or even know their own API Key.
HTTP Request
POST http://wufoo.com/api/v3/login.{format}
URL Parameters
Parameter | Description |
---|---|
format | Either ‘json’ or 'xml’ is required. This will determine response format |
POST Parameters
Parameter | Description |
---|---|
integrationKey | Required. This is your Login integration key. You can apply for one here |
Required. The user’s email, which acts as the identifier for their account. | |
password | Required. The user’s password |
subdomain | Optional. The user’s subdomain. Is required if the email belongs to a sub-user or the email address is used on multiple accounts. |
A successful response will contain:
ApiKey - This is the user’s API Key. You can then use this to make API requests on their behalf.
UserLink - This is a link for the corresponding Users request for this specific user.
Subdomain - The subdomain for the user. You’ll need this to make proper API requests to the user’s account.
Sub-users and Multiple subdomains
If the user you’re trying to access is either: - A subuser of the account - An Account Creator and/or sub-user on multiple accounts the subdomain parameter is required.
If you leave out the subdomain, but one of the above criteria applies, you’ll receive a 409 error. To avoid this, we recommend making all requests with the relevant subdomain parameter, even if it’s not technically “required.”
HTTP Status Codes
Here are the most frequently encountered error status codes, and the common causes:
Error Code | Message | Meaning |
---|---|---|
400 |
Your request has been rejected |
Usually caused by a request made without HTTPS |
400 |
You must provide both a email and password, and integration key to continue |
Triggered by a missing email, password, API Key or Integration key |
401 |
Various | Your authentication was not correct, usually due to an invalid API Key, email, etc. |
403 |
You have reached the maximum number of integrations allowed for this form |
Forms can only have a maximum of 10 integrations (Webhook, MailChimp, etc.) |
403 |
You are not permitted to {action} this {resource} ask your administrator for rights to this |
The user tied to your API Key doesn’t have view/edit permissions for the form/report you’re trying to access |
404 |
Invalid identifier |
Request made for an invalid form/report identifier |
404 |
Not Found |
Normally caused by a malformed request URL |
409 |
Multiple accounts exist for this email address. Please specify a subdomain in a subsequent call |
No subdomain included in Login request |
420 |
Too many login attempts. You are only allowed 6 failed attempts. Account temporarily frozen |
Too many failed Login requests |
421 |
You have exceeded your daily API usage |
You have exceeded the request limit for your plan in the last 24 hours |
429 |
Slow Down |
You have exceeded the API Rate Limit. Try again in a few minutes. |
500 |
Various | Server error. Send our support team the request you used, and we can take a closer look |
Form Embed Guide
This guide shows how to get form code that will let you build a tool that lets users embed a Wufoo form into your website or application. To do so, we’ll have to circumvent same origin policy for JavaScript calls. We do this with a library called EasyXDM which simplifies cross-domain talking. We encourage you to read their documentation.
A Simple Example
A Simple Example
<html>
<body>
<div id="popup"></div>
<script src="http://wufoo.com/scripts/iframe/formEmbedKit.js"></script>
<script>
var wufoo_framework = WufooFormEmbedKit({'userDefinedCallback':userDefinedCallback, 'displayElement':'popup'});
wufoo_framework.display();
function userDefinedCallback(message) {
alert(message);
wufoo_framework.destroy();
}
</script>
</body>
</html>
On our example page, we present a common use case, how to preview a Wufoo iFrame selected by the user.
Line 3 - Defines a div with an ID that corresponds to the second parameter of the function we define on Line 6. This is where our iFrame will appear.
Line 4 - Pulls the WufooFormEmbedKit function from our servers
Line 6 - Assigns the WufooFormEmbedKit function to the framework object.
Line 7 - Calls the initialize function, which opens the Wufoo iFrame
Line 8 - userDefinedFunction is created. This does not need to be called userDefinedFunction, but it must match the first parameter in the function defined on Line 6. This function is all yours to define what you want to do with the message parameter when it returns. In our case, we’re simply going to alert it to the screen. In your case, you’re going to do one of two things: 1) concatenate and save the two scripts defined within to your user’s markup 2) preview the form to your user, as explained in our more robust example.
Line 9 - Tears down the framework. This closes the iFrame.
A More Robust Example
First, let’s take a look at how the markup has been set up. The example page (and ultimately your page) is a basic HTML document with a few specially named elements. Let’s look at each.
The Button (Fig. 1) - When clicked, you call the method on the object defined in Fig. 8. This action will open the iFrame in the browser.
The action-area (Fig. 2) - We’ll be filling this div with a preview of user’s chosen form. This need not be named action-area, but it must correspond to the targetElement parameter of the script call made in Fig. 7.
The popup div (Fig 3) - The Wufoo Form Embed Kit will fill this div with the iFrame from which the user will choose the form. The iFrame is fixed at 640x480px.
A More Robust Example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Wufoo Form Embed Kit · Example</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="http://wufoo.com/css/iframe/example.css">
</head>
<body>
<header>
<h1>Your Awesome Web Application</h1>
</header>
<div id="content">
<div id="actions">
<ul>
<li><a href="#">Do something</a></li>
<li><a href="#">Do something</a></li>
<li><a href="#">Do something</a></li>
<li><a href="#">Do something</a></li>
<!-- FIG. 1 -->
<li>
<a href="#" id="insert-wufoo-form">Insert Wufoo Form</a>
</li>
</ul>
</div>
<!-- FIG. 2 -->
<div id="action-area"></div>
</div>
<!-- FIG. 3 -->
<div id="popup">
<div id="iframe-goes-here"></div>
<img src="//wufoo.com/images/iframe/demo/fancy_close.png" alt="Close">
</div>
<!-- FIG. 4 - The Wufoo Form Embed Kit -->
<script src="//wufoo.com/scripts/iframe/formEmbedKit.js"></script>
<!-- FIG. 5 Prototype. You can use jQuery if you like -->
<script src="//ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>
<!-- FIG. 6: only required if previewing the form for the user. Add disableForm=true to disable submission in preview -->
<script src="//wufoo.com/scripts/embed/iframe.js?targetElement=action-area"></script>
<script>
//FIG. 7: init the form embed kit (Warning: Global)
var wufoo_framework = WufooFormEmbedKit({'userDefinedCallback':userDefinedCallback, 'displayElement':'iframe-goes-here', 'provider':'undefined'});
//Fig 8: Event listeners, intended to build up and tear down the library.
$('insert-wufoo-form').observe('click', function() {
$('popup').setStyle({display:'block'});
wufoo_framework.display();
return null;
});
// Clicking anywhere outside closes it
$('popup').observe('click', function() {
$('popup').setStyle({display:'none'});
wufoo_framework.destroy();
return null;
});
//FIG. 9: define a callback, with the required parameters
function userDefinedCallback(message) {
//FIG. 10 Close lightbox
$('popup').setStyle({display:'none'});
// FIG. 11: MAGIC: Receive code from wufoo.com
var objMessage = JSON.parse(message);
// FIG. 12: Create div and write out code for preview
// You wouldn't necessarily need to preview, you can do whatever you want with the code
$('action-area').insert(objMessage.display);
// FIG. 13: tear down the library.
wufoo_framework.destroy();
}
</script>
</body>
</html>
The Script Tags
The example contains three script includes. Let’s discuss what each does.
Script Tags
FIG. 4 - The Wufoo Form Embed Kit
<script src="//wufoo.com/scripts/iframe/formEmbedKit.js[?debug=true]"></script>
FIG. 5 Prototype. OPTIONAL, we are using for a little helping hand. You can use jQuery, MooTools, whatever... or nothing.
<script src="//ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script>
FIG. 6: only required if previewing the form for the user
<script src="//wufoo.com/scripts/embed/iframe.js?targetElement=action-area"></script>
formEmbedKit.js (Fig 4) - This is the bread and butter. This script is required to make the Wufoo Form Embed Kit work. Without it, bupkis. If you want to see the debugging info provided by your local copy of EasyXDM, add the query parameter debug=true to the end of it. Be aware: this code has not been minimized and logs a lot, which slows your code down, so use only if you’re trying to work out a problem.
Prototype (Fig 5) - Not required, but used throughout our example for some help.
iframe.js (Fig 6) - This script include is only required if you plan to preview the form on the page for the user. Notice that we pass a GET parameter named targetElement which corresponds to the div defined in Fig. 2. Technically, this prevents the Wufoo iFrame embed snippet from using document.write when placed on the page.
Note the URL’s start with // - that allows those resources to load from HTTP if on a non-secure page or HTTPS if on a secure page. A scheme-relative URL, if you will.
The Lightbox Effect
We set up two event listeners to handle the click events on the page.
The first event we check for is the clicking of the <a>
element to open the form. When clicked, we reveal the popup div, which gives the appearance of a lightbox. We also call display on the wufoo_framework object. This opens the Wufoo Form Embed Kit.
We check for a click on the popup. When this happens (the user is done interacting with the iFrame) the wufoo_framework object is destroyed. This removes the iFrame from the page and closes the lightbox effect.
The Lightbox Effect
//Fig 8: Event listeners, intended to build up and tear down the library.
$('insert-wufoo-form').observe('click', function() {
$('popup').setStyle({display:'block'});
wufoo_framework.display();
return null;
});
// Clicking anywhere outside closes it
$('popup').observe('click', function() {
$('popup').setStyle({display:'none'});
wufoo_framework.destroy();
return null;
});
User Defined Callback
To make this page operational, we must react to the callback. Here’s how that works.
Close the Lightbox (Fig 10) - Using prototype, we grab the popup
tag and set the CSS selector to display:none. This hides the popup from view. You can get fancy here if you like.Parse the JSON (Fig 11) - At this point, we’re using Douglas Crockford’s json2 (automatically included with the Form Embed Kit) to parse the returned message. If your user’s browser is modern, it will use the built-in JSON parsing call. Otherwise, this the json2 library will be used. Either way, know that the JSON object is safely converted to an object. You can read about this JSON node in the Return Values section of this documentation. For now, know that it contains Wufoo’s Form Embed Snippet for iFrame creation.
Append the Embed Snippet (Fig 12) - In order to make the page execute the scripts, you must append it to the DOM using the snippet shown here. We’re appending scripts, using a JavaScript library’s insert method to do so will safely eval them. Most libraries should have some method for this, for instance, jQuery’s append will do it as well.
Destroy the Library (Fig 13) - calling framework.destroy() simply removes the iFrame you hid earlier in step 10.
User Defined Callback
//FIG. 9: define a callback, with the required parameters function userDefinedCallback(message) { //FIG. 10 Close lightbox $('popup').setStyle({display:'none'}); // FIG. 11: MAGIC: Receive code from wufoo.com var objMessage = JSON.parse(message); // FIG. 12: Create div and write out code for preview // You wouldn't necessarily need to preview, you can do whatever you want with the code $('action-area').insert(objMessage.display); // FIG. 13: tear down the library. wufoo_framework.destroy(); }
Return Values
When you set up the User Defined Callback, you provided a message parameter. When the user returns from our iFrame, this parameter will be filled with JSON.
Return Values
{ "setup":"<script type="text\/javascript">var host = (("https:" == document.location.protocol) ? "https:\/\/secure." : "http:\/\/");document.write(unescape("%3Cscript src='" + host + "wufoo.com\/scripts\/embed\/iframe.js' type='text\/javascript'%3E%3C\/script%3E"));<\/script>", "display":"<script type="text\/javascript">\nvar z7x4a9 = new WufooForm();\nz7x4a9.initialize({\n'userName':'wufooapi', \n'formHash':'z7x4a9', \n'autoResize':true,\n'height':'627',\n'ssl':true});\nz7x4a9.display();\n<\/script>" }
This is simply a JSON object which contains two properties, each containing a
<script>
tag which is ready to be added to your user’s markup. The two properties of this object are as follows.setup - this contains a utility script required to make Wufoo forms appear.
display - this is final product: a
<script>
tag which will draw a Wufoo form on your page. We added this script to the page in Fig 12. Based on your user’s account level, the ssl property will be automatically set to true or false.
If you don’t plan on previewing the iFrame for the user, you may concatenate the setup and display and save them for eventual embedding on the user’s page. However, if you’re previewing the form like we do in this example, the setup node must not be included on your page. This is because the setup node has already been written as a script include in Fig 7.
Register Your Kit
It is free and easy to register your Wufoo Form Embed Kit, and it unlocks some powerful features:
- Allow for new user signups directly through the kit.
- Show your logo inside the kit on the login screen.
- Show your application’s name as the place to return to after a user creates or edits a form on Wufoo.com