Learn about how to configure forms on your website using our forms technology
Contact support to request that a form be created. This will be completed by our engineering team and the turn around time is about 1-2 business days or less.
When making a request, please specify the following:
error
query parameter to the URLImportant Notes
There are multiple methods for the form to be published on a retailer’s website and used for capturing customer subscriptions:
Any basic html form will be able to submit to this form. Below is an example of a basic form that is enabled to submit to the above example:
<html>
<body>
<h1>Sign up</h1>
<form action='https://api.bevsuite.com/forms/submit' method='POST'>
<input type='hidden' name='formID' value='NyIPVmOL9c9eyHPpiyVZnOLGMxM1Ec51SY4jui3PbMsVAL'>
<input type='text' name='email'>
<input type='submit' value='Submit'>
</form>
</body>
</html>
Parameter | Type | Required | Description |
---|---|---|---|
formID | string | Yes | Public UUID hash value of the form, specific to the retailer. Supplied by BevSuite support. |
string | Yes | E-mail address in proper https://datatracker.ietf.org/doc/html/rfc5322 format. The parameter name is case insensitive. The email value is case insensitive. | |
firstName | string | Optional | First name of the individual |
lastName | string | Optional | Last name of the individual |
acceptedListIds | array of numbers | Optional | Specifies the email list(s) to subscribe the individual to. If included, the list Ids are validated against the form configuration. If omitted, the individual will be assigned one or more default lists. |
Please note:
enctype="application/x-www-form-urlencoded"
. The form cannot be a enctype="multipart/form-data"
form or other form encoding types/
/
will result in an errorA link to the above form can be found in each environment with the formID set to test
:
https://api.bevsuite.com/forms/show
Invalid email:
curl -X POST 'https://api.bevsuite.com/forms/submit' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'formID=test&email=bademailbevsuite.com'
Valid email:
curl -X POST 'https://api.bevsuite.com/forms/submit' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'formID=test&email=goodemail@bevsuite.com'
Form submissions can be provided to us directly via our Public Forms API. This gives you the flexibility of customizing it exactly how you want, without having to compromise on your customer experience.
This scenario is particularly useful in a couple scenarios, including:
This section outlines the details around the API calls available to use for this purpose.
Public Forms API Parameters
Status Code | Error | Description |
---|---|---|
400 | Email is missing. | The email field is missing from the request |
400 | Email address is invalid. | The email doesn’t pass out validation and may not conform to RFC 5322 |
400 | Invalid form type ‘’ for given formID. | This form type is not supported. |
404 | Form does not exist. | The formID provided does not exist. Please check the formID to ensure that it matches what was provided by BevSuite support. |
500 | Internal Server Error | Ensure you are using the correct formID provided by BevSuite support. If you experience this repeatedly, check our status page for any service outages or contact support for assistance. |
Invalid email:
$ curl -i --location --request POST 'http://api.bevsuite.com/forms/submit' \
--header 'Content-Type: application/json' \
-d '{ "formID": "test", "email": "bademailbevsuite.com" }' ;
Valid email:
$ curl -i --location --request POST 'http://api.bevsuite.com/forms/submit' \
--header 'Content-Type: application/json' \
-d '{ "formID": "test", "email": "goodemail@bevsuite.com" }' ;
Invalid email:
$ curl -X POST 'https://api.bevsuite.com/forms/submit' \
-H 'Content-Type: application/x-www-form-urlencoded' -v \
--data-urlencode "formID=test" \
--data-urlencode "email=bademailbevsuite.com"
Valid email:
$ curl -X POST 'https://api.bevsuite.com/forms/submit' \
-H 'Content-Type: application/x-www-form-urlencoded' -v \
--data-urlencode "formID=test" \
--data-urlencode "email=goodemail@bevsuite.com"
This returns a Vanilla HTML form that can be loaded in a browser for testing purposes. See the below example for the code that is produces.
In some cases, you may want to keep your existing third-party web platform (i.e. Wordpress, content management system, e-commerce platform, etc.) while integrating into our platform.
This can be accomplished by configuring your third-party platform to post the submissions to the POST /forms/submit endpoint as a webhook.
https://api.bevsuite.com/form/submit
Content-Type
header to application/json
formID
field to the key provided by the Request a Form to be Created stepemail
field with the email address of your customer in the body of the message as a JSON object
firstName
, lastName
fields are optional.acceptedListIds
is also optional, but helpful if you want to give your customers control to specify the lists they want to be included on.
{
"formID": "NyIPVmOL9c9eyHPpiyVZnOLGMxM1Ec51SY4jui3PbMsVAL",
"email": "tom@bevsuite.com",
"firstName": "Tom",
"lastName": "M",
"acceptedListIds": [ 1, 2 ]
}
HTTP Method
as POST