Submit a Ticket My Tickets
Welcome
Login  Sign up

How To Server Post Leads In JSON

This article will cover:



What Is A CAKE Lead Posting Document?


A Lead Posting Document provides the various methods and instructions on how to post leads to CAKE. It details 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.


Note:

Server posting leads into CAKE requires the Lead Distribution software license. For more information on this license, click here



What Is A Server Post?


A server post, sometimes referred to as an API post or a webhook, is used to transfer lead data directly from one server to another (CAKE). This method is commonly used when you are purchasing lead data directly from an affiliate or when tracking the click prior to the lead (session posting) is not an option. Because there is no click, a server post to CAKE requires a Campaign ID for attribution and a Post Key for authentication. The Campaign ID and Post Key are located on the campaign card > Show Post Keys button.




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 Server Post A Lead In JSON Format?


To server 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 Server 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 Campaign ID and Campaign Key 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
  8. Log the JSON Success/Error response and its details









FAQ


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.