Skip to main content
Chariow provides a comprehensive affiliate management system that allows you to grow your sales through partnerships. Affiliates can promote your products using unique referral codes and earn commissions on successful sales.

Affiliate Object

An affiliate contains information about their account, performance metrics, and nested account details:

Key Fields

  • id: Store affiliate public ID (prefixed with saff_)
  • status: Current status (active or suspended)
  • source: How the affiliate joined (e.g., invitation, network)
  • total_visits: Number of referral link visits
  • total_sales: Number of completed sales from referrals
  • total_earnings: Total commission earned with formatted amount
  • account: Nested affiliate account details including user information
  • account.user: The affiliate’s user profile (name, email, etc.)
  • account.pseudo: Display name used by the affiliate
  • account.country: The affiliate’s country with code and name
  • suspended_at: Timestamp when suspended (null if active)
  • suspended_reason: Reason for suspension (null if active)

Affiliate Statuses

Getting an Affiliate

Retrieve a specific affiliate using their unique referral code:
This is useful for:
  • Validating an affiliate code before applying commissions
  • Displaying affiliate information on your website
  • Building affiliate dashboards

Sending Affiliate Invitations

Invite potential affiliates to join your programme by sending invitation emails:

Batch Invitations

You can send up to 25 invitations in a single request. The API will:
  • Create and send invitations for valid new emails
  • Skip emails that are already registered affiliates
  • Skip emails that have pending invitations

Response

Invitation Object

An invitation contains information about its status, who sent it, and expiration:

Invitation Statuses

Webhook Events

When an affiliate joins your store (accepts an invitation), a webhook event is triggered via Pulses.

affiliate.joined

Triggered when a new affiliate joins your store.
Configure Pulses in your Chariow dashboard (Automation > Pulses) to receive these events.

Implementation Example

Here’s a complete example of managing affiliates in your application:

API Endpoints Summary

Best Practices

Affiliate Code Validation

  • Always validate affiliate codes before applying commissions
  • Check the affiliate status is active
  • Cache affiliate data to reduce API calls

Invitation Management

  • Use batch invitations for efficiency (up to 25 emails)
  • Handle skipped emails gracefully
  • Implement retry logic for failed invitations

Webhook Integration

  • Set up webhooks to receive affiliate.joined events
  • Use webhooks to trigger onboarding workflows
  • Store affiliate data when they join for faster lookups

Commission Tracking

  • Track affiliate referrals accurately
  • Provide affiliates with real-time statistics
  • Implement proper attribution windows

Pulses Guide

Set up webhooks for affiliate events

Get Affiliate API

View the Get Affiliate API reference

Send Invitations API

View the Send Invitations API reference

Sales Guide

Track affiliate sales