Submit a Ticket My Tickets
Login  Sign up

How To Session Post Leads In JSON

This article will cover:

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.


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


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.


Can I use the JSON format with a standard Browser or Browser AJAX Post?

   No, CAKE does not support direct website/browser requests with JSON for security purposes.

Why am I receiving a CORS error?

   The CORS error is likely a result of attempting to send a JSON request directly from the website/browser.

Can I pass multiple values into 1 field?

    Yes, if your field is configured as a List type, you can use the following JSON format to pass multiple values: "fieldname" : ["value1", "value2", "value3"]

You may also be interested in:

Did you find it helpful? Yes No

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