How To Session Post Leads In JSON

This article will cover the following:


This article will cover the following:


What Is A CAKE Lead Posting Document?

A Lead Posting Document provides instructions on how to post leads to CAKE. It also shows all possible form fields and related information, such as required fields, field types (string, number, etc.), and more. A Posting Document can be dispersed to an affiliate or used to configure the form on your hosted landing page.


What Is A Session Post?

A session post is a hybrid method that involves a click on a CAKE tracking link redirecting the user to a webpage, then a server-side post/webhook to transfer the associated lead data directly to CAKE. This method is commonly used when you are working with affiliates/internal sources to drive traffic to a hosted webpage. A click on the CAKE tracking link generates the required Request Session ID used for attribution and the Offer ID is used for authentication/intent.

Note: Session posting leads into CAKE requires both the Lead Distribution software license and Affiliate Marketing software license. For more information on these licenses, click above.

What Is JSON?

JSON, or JavaScript Object Notation, is a way of formatting data before transmitting it from a server or webpage to another endpoint. In our case, formatting lead data before posting it into CAKE. The format uses a key-value pair structure that is easy to read/write and is a standard language for most developers.


How Do I Session Post A Lead In JSON Format?

To session post a lead in JSON format, follow these steps:

  1. Navigate to the Home tab of the Vertical or Offer card
  2. Click the Posting Doc button
  3. Select Session Post (JSON) from the top right drop down
  4. Configure your server to the CAKE Endpoint
  5. Configure the Content-Type and Accept Headers for JSON
  6. Configure the JSON Request (body) to include the required Offer ID and Request ID as well as any additional vertical fields you want to receive in CAKE
  7. Use 1 of the 3 test methods when posting a test lead. Be sure to click on a CAKE test link first to generate the request ID/simulate a full test.
  8. Log the JSON Success/Error response and its details

Note: The Click Request Session ID (Request ID) must be passed to the lead collection form using #reqid# in the Landing Page Link. This value is generated by CAKE when the user clicks on a CAKE Tracking link. For more details on how to pass the CAKE Request ID, click here.

ttachments/production/13157035627/original/XS7lW3oHJuv91w0NI4T8ammP_BmTfMeqzQ.png?1706222213" style="width: auto;" >


If you have any questions, please reach out to your dedicated CAKE Client Success Manager/Account Manager or contact the CAKE Support Team at support@getCAKE.com.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.