Active white papers api will return all white papers that are available for specified locale and website.
Authentication
Once you've requested an access token, you'll be able to start making calls to the API.
Be aware that if user password is expired, you will get access token, but there will be an error trying to access any of the API’s with that access token.
Example expired password response:
{ "type": "https://tools.ietf.org/html/rfc2616#section-10", "title": "An error occurred", "detail": "Password expired" }
Active Campaign White Papers API
Request
https://dev.cvtr.io/api/v4/campaign-whitepapers/active/{WEBSITE_ID}/{LOCALE_ID}?access_token={ACCESS_TOKEN}
Query Parameters:
Parameter | Required | Description |
---|---|---|
page | No | Page number for pagination |
itemsPerPage | No | Items per page (max 100) |
Response
{ "@context": "/api/v4/contexts/CampaignWhitePaper", "@id": "/api/v4/campaign-white-papers", "@type": "hydra:Collection", "hydra:member": [ { "@id": "/api/v4/campaign-white-papers/45", "@type": "CampaignWhitePaper", "id": "45", "commercial": "1", "whitepaper": { "@id": "/api/v4/assets/30", "@type": "Asset", "id": "30", "headline": "Hooli - Making the World a Better Place", "description": "<p>At hooli we help businesses and people throughout the world realize new possibilities. hooli strives to be the planet’s most innovative-centric company where people everywhere can find and unleash the power of our platforms. As the leader in personal, enterprise and environmentally conscious innovation, we help everyone do everything, everywhere…in entirely new ways. With more than 480,000 customers—including 4999 of the Fortune 5000—and with deployments across multiple industries in more than 175 countries around the planet, hooli helps optimize and integrate every form of personal or business hardware or software imaginable. hooli is an Equal Employment Opportunity Employer that is committed to diversity, acceptance and recognition. We offer employment and advancement to all applicants, including minorities, veterans, women, men, individuals with disabilities, convicted criminals, Swedes, and even various types of circus clowns. At hooli, we don't just believe in the power of innovation, we believe in the empowerment of the people who use it. hooli, making the world a better place.</p>", "synopsis": "We're more than the chat, mail, search and phone that's crowned Hooli as the most respected brand in the world.", "whitepaperLogo": "https://demo-io-cvtr-io.s3.amazonaws.com/logos/6d5503f5aa3a4f25590f51df06687344bf5969c9", "whitepaperThumbnail": "https://demo-io-cvtr-io.s3.amazonaws.com/asset/8337c45813c898f45380739788a396806d07d5b2.png" }, "advertiser": { "@id": "/api/v4/advertisers/22007", "@type": "Advertiser", "id": "22007", "name": "Hooli" }, "campaign": { "@id": "/api/v4/campaigns/44023", "@type": "Campaign", "id": "44023", "name": "A Middle-Out Compression Solution Q2 ABM" }, "form": { "@id": "/api/v4/campaign-forms/126", "@type": "CampaignForm", "id": "126", "name": "Hooli", "slug": "hooli" }, "publisher": { "@id": "/api/v4/publishers/11015", "@type": "Publisher", "id": "11015" }, "campaignLink": { "@id": "/api/v4/campaign-links/217", "@type": "CampaignLink", "id": "217" }, "assetTags": [ { "@id": "/api/v4/asset-tags/4", "@type": "AssetTag", "id": "4", "name": "Demo" }, { "@id": "/api/v4/asset-tags/5", "@type": "AssetTag", "id": "5", "name": "Cloud" }, { "@id": "/api/v4/asset-tags/6", "@type": "AssetTag", "id": "6", "name": "Data" } ], "blocks": [ { "@id": "/api/v4/blocks/1", "@type": "Block", "id": 1, "name": "Test" } ], "whitepaperSubcategories": [ { "@id": "/api/v4/subcategories/50", "@type": "Subcategory", "id": "50", "name": "Cloud Storage" }, { "@id": "/api/v4/subcategories/52", "@type": "Subcategory", "id": "52", "name": "Cloud Security" }, { "@id": "/api/v4/subcategories/53", "@type": "Subcategory", "id": "53", "name": "Cloud Hosting" }, { "@id": "/api/v4/subcategories/66", "@type": "Subcategory", "id": "66", "name": "Email Marketing" } ] } ], "hydra:totalItems": 1, "hydra:view": { "@id": "/api/v4/campaign-whitepapers/active/1/1?access_token=MTYxYTU5ZTlhMmYyOWQ5YzE2OTIxYzczZWZjNGU2ZDQ4YzE2MWIzZTc5NmQzNzZkZWQ2Y2JkODJmMTFiZjk1Mw&itemsPerPage=10", "@type": "hydra:PartialCollectionView" } }
Using Active White Papers API with JS Forms
If you want to take care of serving white papers yourself, you can use our Javascript forms with white papers.
On white paper page you have to include javascript form JS tag:
<script type="text/javascript" id="serveCvtrForm-{FORM_SLUG}" data-target="{TARGET_CONTAINER_ID}" src="https://{ENTERPRISE}/forms/{FORM_SLUG}/serve.js?wp={CAMPAIGN_WHITEPAPER_ID}&locale={LOCALE_ID}"></script>
Form will be inserted in container with id specified in data-target
attribute of script tag
You can get all needed parameters from Active White Papers API
FORM_SLUG - $data['hydra:member'][n]['form']['slug'] CAMPAIGN_WHITEPAPER_ID - $data['hydra:member'][n]['id'] LOCALE_ID - locale that you use to call Active White Papers API