# Recommended API Flow

Full API Documentation: [https://apidocs.konnektive.com/?version=latest](https://apidocs.konnektive.com/)

**It is not necessary to use every page listed below. However, the pages that you do use should contain the API calls listed within that section to give you the most data within your Konnektive instance.**

### **Presell Page** <a href="#recommendedapiflow-presellpage" id="recommendedapiflow-presellpage"></a>

1. Call [Import Click](https://apidocs.konnektive.com/?version=latest#834b3843-dd86-40b5-82f0-85a3384fbcfd)

* pageType=presellPage
* userAgent=User Agent Header, used for reporting on browser and device type
* requestUri=The URL that the user requested when they landed on the page (Ex. <https://mylander.com/nutra/?affId=AF54B33412&c1=fb&c2=5000234>)
  * use affId to grant affiliate credit
  * passed values are case sensitive and must match with the affiliate profile’s Passed Values
  * ***Url encode this value to prevent breakage from passing the ampersand***
* httpReferer (optional, for use with [UTM filters](https://help.konnektive.com/konnektive-crm/reports/utm-filters)) = The URL of the previous webpage from which a link to the currently requested page was followed.
  * may be the same value as **requestUri. httpReferer** must include the UTM code(s)

### **Lead Page** <a href="#recommendedapiflow-leadpage" id="recommendedapiflow-leadpage"></a>

1. Call [Import Click](https://apidocs.konnektive.com/?version=latest#834b3843-dd86-40b5-82f0-85a3384fbcfd) - pageType=leadPage - send sessionId returned from first Import Click call if not first cal&#x6C;**\*\***
2. Call [Import Lead](https://apidocs.konnektive.com/?version=latest#05f9224f-913c-4129-95c7-ed078a87e6f0) - partial can be created as soon as you have firstName, lastName, emailAddress or phoneNumber (campaignId and API credentials will also need to be sent) - Send sessionId parameter returned from Import Click to link order to session You can continually call Import Lead as the customer fills their information into your forms - send orderId parameter returned from the first Import Lead call

### **Checkout Page** <a href="#recommendedapiflow-checkoutpage" id="recommendedapiflow-checkoutpage"></a>

1. Call [Import Click](https://apidocs.konnektive.com/?version=latest#834b3843-dd86-40b5-82f0-85a3384fbcfd) - pageType=checkoutPage - send sessionId returned from first Import Click call if not first call\*
   1. Use fraudPixel=1 if using option 1 for the [Device Data Collector Pixel](https://help.konnektive.com/konnektive-crm/admin-setup/plugins/fraud-services/device-data-collector-pixel-ddc-pixel) (Fraud Manager and Kount)
2. You can call [Import Lead](https://apidocs.konnektive.com/?version=latest#05f9224f-913c-4129-95c7-ed078a87e6f0) again if updating/expanding partial information
3. Call [Import Order](https://apidocs.konnektive.com/?version=latest#436cbeab-a41a-4f36-bfb9-7b74fd82a0c0) - send orderId parameter if already exists and sessionId
   1. Call [Confirm PayPal](https://apidocs.konnektive.com/?version=latest#00424b1e-8550-4757-83f0-a0d550225ee0) - Only use if paySource=PAYPAL on Import Order with Legacy PayPal workflow - Please view our [PayPal documentation](https://help.konnektive.com/konnektive-crm/gateway-setup/gateways/paypal-seamless-checkout/paypal-commerce-checkout-legacy) for full instructions

### **Upsell Pages 1+** <a href="#recommendedapiflow-upsellpages1" id="recommendedapiflow-upsellpages1"></a>

1. Call [Import Click](https://apidocs.konnektive.com/?version=latest#834b3843-dd86-40b5-82f0-85a3384fbcfd) - pageType=upsellPage1-4 - send sessionId returned from first Import Click call
2. Call [Import Upsale](https://apidocs.konnektive.com/?version=latest#e480eeb4-f068-4632-b5b6-00a2013e1264) - include orderId and sessionId

Repeat each step for each upsell page

### **Thank you Page** <a href="#recommendedapiflow-thankyoupage" id="recommendedapiflow-thankyoupage"></a>

1. Call [Import Click](https://apidocs.konnektive.com/?version=latest#834b3843-dd86-40b5-82f0-85a3384fbcfd) - pageType=thankyouPage - send sessionId returned from first Import Click call
2. Call [Confirm Order](https://apidocs.konnektive.com/?version=latest#bfaa9e6f-c4a1-4f93-a023-82da818955b1) (optional) to send Order Confirmation Email Immediately

***

## Flowchart

{% file src="<https://1103784913-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiAC0G99SjXjSv2GM5PAE%2Fuploads%2FIXZdGK8NgKkG3MonliT1%2FRecommended%20API%20Flow-2.pdf?alt=media&token=15988d5d-e22f-40be-83e0-e925694699a0>" %}
&#x20;
{% endfile %}

***

### **API Descriptions** <a href="#recommendedapiflow-apidescriptions" id="recommendedapiflow-apidescriptions"></a>

[Import Click](https://apidocs.konnektive.com/?version=latest#834b3843-dd86-40b5-82f0-85a3384fbcfd) - <https://api.konnektive.com/landers/clicks/import/>

The Import Click API allows you to track visits to your landing pages in the CRM Reporting.

{% hint style="success" %}
**\*\***&#x4F;n the first Import Click call you must pass the url encoded requestUri. The first Import Click call is also where you should pass the userAgent and httpReferer values.\
\
Upon a successful call, the API will return a sessionId for the funnel session. This sessionId must be sent on subsequent API calls made from the funnel in order to tie the clicks to the partial order or complete order that is placed.
{% endhint %}

***

[Import Lead](https://apidocs.konnektive.com/?version=latest#05f9224f-913c-4129-95c7-ed078a87e6f0) - <https://api.konnektive.com/leads/import/>

The Import Lead API allows you to add new leads to the CRM.

***

[Import Order](https://apidocs.konnektive.com/?version=latest#436cbeab-a41a-4f36-bfb9-7b74fd82a0c0) - <https://api.konnektive.com/order/import/>

The Import Order API allows you to create new orders.

***

[Confirm Paypal](https://apidocs.checkoutchamp.com/?version=latest#6d2a3ec0-e1f5-44b3-94a0-101921c28521) - <https://api.konnektive.com/transactions/confirmPaypal>

The Confirm Paypal API allows you to complete orders on your pages using the Paypal Express Checkout button.

***

[Import Upsale](https://apidocs.konnektive.com/?version=latest#e480eeb4-f068-4632-b5b6-00a2013e1264) - [https://api.konnektive.com/upsale/import/](https://api.konnektive.com/order/confirm/)

The Import Upsale API allows you to add one-click upsales to existing orders.

***

[Confirm Order](https://apidocs.konnektive.com/?version=latest#bfaa9e6f-c4a1-4f93-a023-82da818955b1) - <https://api.konnektive.com/order/confirm/>

The Confirm Order API will immediately send confirmation auto responder emails to the customer.

***
