Affilibee
Toggle sidebar

API Integration

This is the recommended implementation path for teams connecting Affilibee to their own storefront, checkout flow, and order lifecycle. The goal is to keep attribution on your platform until an order reaches a valid state, then submit that completed order to Affilibee for commission calculation and payout processing.

This guide explains the workflow and integration assumptions. Use API introduction for the structure of the API reference, Authentication for token requirements, Create order for the endpoint contract, Testing your integration for validation, and Troubleshooting when something in the flow is missing or incorrect.

Share this page with the team building the integration
The implementation model is straightforward: capture attribution, persist it to the order, and submit the completed order once it is valid in your own system.

Integration model

Most teams will implement the integration in three stages:

  1. capture the affiliate slug when the visitor arrives through an affiliate link
  2. persist that attribution to the order created in your platform
  3. submit the completed order to Affilibee once it reaches a valid state

That flow keeps attribution logic close to the commerce system that already owns the customer session and checkout state.

Capture attribution on arrival

When a customer lands on your site through an affiliate link, your platform should capture the affiliate slug immediately. In most implementations this is done with a first-party cookie or similar attribution mechanism that survives the customer journey until checkout.

Many teams use a last-touch model, where a newer affiliate slug replaces the previous one before purchase. A 30-day window is a common choice, but the exact duration is a business decision on your side rather than an Affilibee requirement.

Persist attribution to the order

At order creation time, read the captured slug from your attribution store and write it to the order record in your own system. This is the point where attribution moves from session state into durable commerce data.

If the slug is missing, invalid, or unexpectedly changed, log that event on your side. Missing attribution is easier to debug when you can inspect both the incoming affiliate link and the stored order metadata.

Submit the completed order

Submit the order once it reaches a state in your platform that you consider valid for commission tracking, usually confirmed or completed. This helps avoid sending failed, cancelled, or still-changing orders too early.

You will need an API token from Settings -> API Tokens in the Affilibee dashboard. Review Authentication for the required header and Create order for the request format and payload details.

Implementation notes

  • submit orders from a stable point in your order lifecycle
  • log outbound requests and failed responses on your side
  • keep the stored affiliate slug visible in your own order data for debugging
  • treat the API reference as the contract, and this page as the operating model

Where to go next

Continue with Testing your integration to validate the full flow from affiliate click to attributed order. If something in the journey is not working as expected, continue with Troubleshooting.

Got questions? We're here for you.

We help teams run affiliate programs through API-first integrations that fit the platform they already use.

© 2025 Affilibee Handelsbolag (969802-2481)

Integrations

API Integration
How can we assist you today?

Fill in the form below and we'll get back to you as soon as possible.

Name
Email
Message