Skip to content

Instantly share code, notes, and snippets.

View activeprospect-support's full-sized avatar

ActiveProspect Support activeprospect-support

View GitHub Profile
@activeprospect-support
activeprospect-support / query.sh
Last active August 29, 2015 14:07
Querying Multiple Lists
$ curl -X GET https://app.suppressionlist.com/exists/my_list|my_other_list|my_third_list/[email protected] \
-H 'Accept: application/json' \
-uAPI:fc36c8168cbb16784f6a29f89695dd92
@activeprospect-support
activeprospect-support / Multiple.sh
Last active August 29, 2015 14:07
SL - Querying a list in SuppressionList
https://app.suppressionlist.com/exists/{{list_id_1}}|{{list_id_2}}/{{query_term}}:
@activeprospect-support
activeprospect-support / query not found.sh
Last active August 29, 2015 14:07
SL - Querying a list in SuppressionList
HTTP/1.1 404 NOT FOUND
Content-Type: application/json; charset=utf-8
{
"specified_lists": ["my_list"],
"key":"[email protected]",
"found":false
}
@activeprospect-support
activeprospect-support / Query found.sh
Last active August 29, 2015 14:07
SL - Querying a list in SuppressionList
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"specified_lists":["my_list"],
"key":"[email protected]",
"found":true,
"exists_in_lists":["my_list"]
}
@activeprospect-support
activeprospect-support / technical updates.js
Created October 7, 2014 20:26
TF - Technical Updates: Testing Upcoming Script Changes
<script type="text/javascript">
(function() {
var field = 'xxTrustedFormCertUrl';
var provideReferrer = false;
var tf = document.createElement('script');
tf.type = 'text/javascript'; tf.async = true;
tf.src = 'http' + ('https:' == document.location.protocol ? 's' : '') +
'://api.next.trustedform.com/trustedform.js?provide_referrer=' + escape(provideReferrer) + '&field=' + escape(field) + '&l='+new Date().getTime()+Math.random();
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s); }
)();
@activeprospect-support
activeprospect-support / JS in a form.js
Created October 7, 2014 20:23
TF - How to set up the JavaScript in a form
<script type="text/javascript">
(function() {
var field = 'xxTrustedFormCertUrl';
var provideReferrer = false;
var tf = document.createElement('script');
tf.type = 'text/javascript'; tf.async = true;
tf.src = 'http' + ('https:' == document.location.protocol ? 's' : '') +
'://api.trustedform.com/trustedform.js?provide_referrer=' + escape(provideReferrer) + '&field=' + escape(field) + '&l='+new Date().getTime()+Math.random();
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(tf, s); }
)();
@activeprospect-support
activeprospect-support / with LC.js
Last active February 24, 2016 14:19
Claiming Certificates with LC
if ((lead.xxTrustedFormCertUrl == null)||(lead.xxTrustedFormCertUrl == '')){
lead.invalidate("Missing Required Trusted Form Certificate");
}
$ curl -X PUT -uAPI:fc36c8168cbb16784f6a29f89695dd92 https://app.trustedform.com/account -H 'Accept: application/json' -H 'Content-Type: application/json' -d'{"claim_dtl":90}'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "51deda5582d28ba54c000002",
"name": "Advertiser",
"api_key": "fc36c8168cbb16784f6a29f89695dd92",
"claim_dtl": 90,
$ curl -X GET -uAPI:fc36c8168cbb16784f6a29f89695dd92 'https://app.trustedform.com/claims?limit=50' -H 'Accept: application/json'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
[
{
"id": "51ddbe9d82d28b8d38000009",
"page_id": "51de277782d28be89900008a",
"warnings": [],
"reference": "ABC123",
$ curl -X GET -uAPI:fc36c8168cbb16784f6a29f89695dd92 https://app.trustedform.com/claims/51ddbe9d82d28b8d38000009 -H 'Accept: application/json'
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"id": "51ddbe9d82d28b8d38000009",
"age": 10,
"page_id": "51de277782d28be89900008a",
"warnings": [],