TrustedForm account holders who are receiving certified leads can use the TrustedForm API to claim the certificate provided with each lead. Doing so
To claim a certificate using the TrustedForm API, send an HTTP POST request to the certificate URL sent by your publisher.
Do not make a request unless the URL starts with
https://cert.trustedform.com
, otherwise you may expose your
TrustedForm credentials to someone else
Accept: application/json
request headerContent-Type: application/json
or
Content-Type: application/x-www-form-url
encoded header, and
encode the request body accordingly.As part of the claiming process, it's often required that certain
language either exists or doesn't exist on the page. For example,
you may want to ensure certain consent language exists. As another
example, you may want to ensure other language does not exist, such
as "free iPhone". In both cases, you can provide the language to
"scan" for using the scan
and scan!
parameters.
scan
: Use this parameter to scan for language you want to ensure
exist on the page.scan!
: Use this parameter to scan for language you want to
ensure does not exist on the page.Often, you will want to scan against a variety of possible texts. The TrustedForm Claiming API enables you to do this in three ways:
scan[]
or scan![]
You can use a mixture of all three.
Use {{*}}
in the consent language you wish to scan for as a
wildcard. For Example, passing "on behalf of {{*}} at the telephone
number" will match "on behalf of Mortgage Acme at the telephone
number".
Like using exact language, scans using wildcards can be sent in as an array.
Templating is different than other versions of page scanning in that you must 1) send it as JSON (i.e. Content-type of application/json); 2) provide a list of key/values to use in the template.
If we were to use the example from above, we might use the following templates:
{
"scan": [
{
"template": "on behalf of {{company}} at the telephone number",
"variable_maps": [
{"company": "Mortgage Acme"},
{"company": "Acme Mortgage"},
{"company": "Acme Co."}
]
},
{
"template": "on behalf of {{company}} at the {{contact_method}}",
"variable_maps": [
{"company": "Mortgage Acme", "contact_method": "email"},
{"company": "Acme Mortgage", "contact_method": "fax number"},
{"company": "Acme Mortgage", "contact_method": "email"},
{"company": "Acme Co.", "contact_method": "email"}
]
}
]
}
Certificates created with the sandbox
flag set to true
cannot be
claimed.
Claiming Parameters
Created
Malformed Certificate URL
Unauthorized
Certificate not found
Attempted to claim a 'sandboxed' certificate
The certificate is expired and no longer available to be claimed
The certificate has been claimed too many times
{- "email_1": "user@example.com",
- "phone_1": "512-555-1234",
- "reference": "1128238382829",
- "scan": "I agree to the terms of service",
- "scan!": "I do not agree to the terms of service",
- "vendor": "Acme Co."
}
{- "age": 794,
- "cert": {
- "browser": "Chrome 94.0.4606.71",
- "claims": [
- {
- "age": 794,
- "created_at": "2021-11-02T15:40:29Z",
- "expires_at": "2026-11-01T15:40:29Z",
- "fingerprints": {
- "matching": [ ],
- "non_matching": [ ]
}, - "id": "61815bed196a8f0722c3597a",
- "masked": false,
- "page_id": "5e29f7dc2e1fa997a0000001",
- "reference": null,
- "scans": {
- "found": [
- "the Certificate URL",
- "Submit the {{*}} a claim"
], - "not_found": [
- "Submit the norm",
- "your mom"
]
}, - "vendor": null,
- "warnings": [ ]
}
], - "created_at": "2021-11-02T15:27:04Z",
- "event_duration": 11283,
- "expires_at": "2021-11-08T15:27:04Z",
- "framed": false,
- "geo": {
- "city": "Columbus",
- "country_code": "US",
- "lat": 39.9625,
- "lon": -83.0061,
- "postal_code": "43215",
- "state": "OH",
- "time_zone": "America/New_York"
}, - "ip": "3.18.197.0",
- "operating_system": "Linux",
- "parent_location": null,
- "token": "b90e65de06afb55bff16f05536d981bb4bb24452",
- "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 DatadogSynthetics"
}, - "created_at": "2021-11-02T15:40:29Z",
- "expires_at": "2026-11-01T15:40:29Z",
- "fingerprints": {
- "matching": [ ],
- "non_matching": [ ]
}, - "id": "5fc4f8db2e1fa9cae0106a06",
- "masked": false,
- "page_id": "5e29f7dc2e1fa997a0000001",
- "reference": null,
- "scans": {
- "found": [
- "lorem ipsum dolor"
], - "not_found": [
- "Ad qui aperiri"
]
}, - "vendor": null,
- "warnings": [ ]
}