User Tools

Site Tools


en:public:developer:template_system:tags:api:add_lead

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:public:developer:template_system:tags:api:add_lead [2013/01/14 16:20]
admin [Example]
en:public:developer:template_system:tags:api:add_lead [2013/03/30 18:08] (current)
svanderclock [CfgPages configuration]
Line 2: Line 2:
  
 Use this function to add a lead in the database. This function must be called only from  Use this function to add a lead in the database. This function must be called only from 
-[[en:public:developer:template_system:cfgpages]]. The Lead will be also connected to the current web +[[en:public:developer:template_system:cfgpages]]. The Lead will be connected to the current web 
-user as the Buyer. The ID of the referrer (if any) of the lead will be extracted from the cookie +user (as the Buyer). The ID of the referrer (if any) of the lead will be extracted from the cookie 
 [[en:public:developer:template_system:reserved_parameters:ak__source]] [[en:public:developer:template_system:reserved_parameters:ak__source]]
 ==== CfgPages configuration ==== ==== CfgPages configuration ====
  
 <code xml> <code xml>
-  <page name="My_Add_lead_Api_Function"> +<page name="add_lead"> 
-    <cfg> +  <cfg> 
-      <userrights> +    <userrights> 
- <userright name="ALLUSER"/> +      <userright name="ALLUSER"/> 
-      </userrights> +    </userrights> 
-      <frames> +    <frames> 
- <frame name="mainframe" processname="Add_leadpreload=&quot;1&quot;/> +      <frame name="content" processname="add_lead"/&gt; 
-      </frames+    &lt;/frames
-    </cfg+    <maintemplate>maintemplates\maintemplate_empty.html</maintemplate
-  </page>+    <content_type>&lt;#content_type&gt;</content_type
 +  </cfg> 
 +</page>
 </code> </code>
  
-==== RESTFUL API ====+==== Parameters ====
  
-The ArKadia API currently supports a [[http://en.wikipedia.org/wiki/REST|RESTful]] interface, that essentially  +Parameters are taken from tag (default) or from HTTP GET/Post
-means you can send an HTTP GET or POST to call exposed methods, and you'll get back an XML document  +
-in return. +
- +
-When you call this function, you'll get a response in XML that looks like this: +
- +
-<code xml> +
-<rsp stat="ok" version="1.0"> +
-  [Data in XML format - see individual method docs] +
-</rsp> +
-</code> +
- +
-If there's an error, you'll get a response with an error message about the problem. +
- +
-<code xml> +
-<rsp stat="fail"> +
-  <error msg="Error Message" /> +
-<rsp> +
-</code> +
- +
-==== HTTP Get/Post Parameters ====+
  
 ^ Name                                                        ^ Mandatory ^ Default             ^ Description       ^        ^ Name                                                        ^ Mandatory ^ Default             ^ Description       ^       
Line 65: Line 47:
     type: "GET",     type: "GET",
     data: {      data: { 
-        Property.ID: <#t__id>,+        Property.ID: 'CA-T1',
         Lead.type: 2         Lead.type: 2
     },     },
en/public/developer/template_system/tags/api/add_lead.1358166018.txt.gz · Last modified: 2013/01/14 16:20 by admin