# Recommended API Flow

Please follow these directions if you are not using the CheckoutChamp website builder.

Full API Documentation:  <https://apidocs.checkoutchamp.com/?version=latest>

{% hint style="success" %}

#### 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 CheckoutChamp instance. <a href="#recommendedapiflow-itisnotnecessarytouseeverypagelistedbelow.however-thepagesthatyoudouseshouldconta" id="recommendedapiflow-itisnotnecessarytouseeverypagelistedbelow.however-thepagesthatyoudouseshouldconta"></a>

{% endhint %}

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

**1.** Call [Import Click](https://apidocs.checkoutchamp.com/?version=latest#e576c9e1-2606-49c2-8ac0-143a35c7add2)

* 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
  * ***Url encode this value to prevent breakage from passing the ampersand***
* httpReferer (optional, for use with [UTM filters](/crm/reports/utm-filters.md)) = 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.checkoutchamp.com/?version=latest#e576c9e1-2606-49c2-8ac0-143a35c7add2) - pageType=leadPage - send sessionId returned from first Import Click call if not first call\*

**2.** Call [Import Lead](https://apidocs.checkoutchamp.com/?version=latest#35a47084-1a24-454e-9309-f6163329fd51) - 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.checkoutchamp.com/?version=latest#e576c9e1-2606-49c2-8ac0-143a35c7add2) - pageType=checkoutPage - send sessionId returned from first Import Click call if not first call\*

* Use fraudPixel=1 if using option 1 for the [Device Data Collector Pixel](/crm/plugins/fraud-services/device-data-collector-pixel-ddc-pixel.md) (Fraud Manager and Kount)

**2.** You can call [Import Lead](https://apidocs.checkoutchamp.com/?version=latest#35a47084-1a24-454e-9309-f6163329fd51) again if updating/expanding partial information

**3.** Call [Import Order](https://apidocs.checkoutchamp.com/?version=latest#275a54c6-b4b0-414c-819b-7387e9a81f58) - send orderId parameter if already exists and sessionId

* Call [Confirm PayPal](https://apidocs.checkoutchamp.com/?version=latest#6d2a3ec0-e1f5-44b3-94a0-101921c28521) - Only use if paySource=PAYPAL on Import Order - Please view our [PayPal documentation](/crm/gateway-setup/gateway-integrations/paypal-commerce-checkout/paypal-commerce-checkout-legacy.md) for full instructions

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

**1.** Call [Import Click](https://apidocs.checkoutchamp.com/?version=latest#e576c9e1-2606-49c2-8ac0-143a35c7add2) - pageType=upsellPage1-4 - send sessionId returned from first Import Click call

**2.** Call [Import Upsale](https://apidocs.checkoutchamp.com/?version=latest#46b9bc0a-687a-4a87-a57c-266f9914681f) - include orderId and sessionId

Repeat each step for each upsell page

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

**Either:**

Call [Import Click](https://apidocs.checkoutchamp.com/?version=latest#e576c9e1-2606-49c2-8ac0-143a35c7add2) - pageType=thankyouPage - send sessionId returned from first Import Click call

**Or:**

Call [Confirm Order](https://apidocs.checkoutchamp.com/?version=latest#c71c6bca-20a0-48af-abd5-75773fdc692f) (optional) to send Order Confirmation Email Immediately

***

### Flowchart

Click the PDF below for an interactive flowchart to aid in explaining which API Calls should be made on each page of your funnel.

{% file src="/files/VaRctqYPLeIseSyHgKSy" %}

***

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

[Import Click](https://apidocs.checkoutchamp.com/?version=latest#e576c9e1-2606-49c2-8ac0-143a35c7add2) - <https://api.checkoutchamp.com/landers/clicks/import/><br>

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

{% hint style="info" %}
On the first Import Click call you must pass requestUri (the full url of the current page). Upon a successful call, the API will return a sessionId. This sessionId must be sent on subsequent API calls in that session to tie the click to the partial order or complete order that is placed.
{% endhint %}

***

[Import Lead](https://apidocs.checkoutchamp.com/?version=latest#35a47084-1a24-454e-9309-f6163329fd51) - <https://api.checkoutchamp.com/leads/import/><br>

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

***

[Import Order](https://apidocs.checkoutchamp.com/?version=latest#275a54c6-b4b0-414c-819b-7387e9a81f58) - <https://api.checkoutchamp.com/order/import/><br>

The CheckoutChamp Import Order API allows you to create new orders.

***

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

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

***

[Import Upsale](https://apidocs.checkoutchamp.com/?version=latest#46b9bc0a-687a-4a87-a57c-266f9914681f) - <https://api.checkoutchamp.com/upsale/import/><br>

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

***

[Confirm Order](https://apidocs.checkoutchamp.com/?version=latest#c71c6bca-20a0-48af-abd5-75773fdc692f) - <https://api.checkoutchamp.com/order/confirm/><br>

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

***

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.checkoutchamp.com/api-documentation/api-documentation/recommended-api-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
