Skip to main content

ReCommerce API Integration Guide for Resellers

This comprehensive guide will walk you through the process of integrating with The Whiz Cells ReCommerce API as a reseller, including placing orders with attribution and monitoring your performance metrics.

Introduction

The Whiz Cells ReCommerce API allows resellers to track customer referrals, monitor conversions, and earn commissions. This guide provides step-by-step instructions for resellers to integrate with the platform.

Step 1: Validating Your API Token

Before proceeding with any API operations, verify that your token is valid:

curl -X GET "https://staging.thewhizcells.com/wp-json/iox-recommerce/v1/validate-token" \
-H "Authorization: Bearer [[token]]"

A successful response will look like:

{
"valid": true
}

To track customer referrals, you need to create attribution links that include your referral ID. These links direct customers to The Whiz Cells website with your referral code attached.

General Format

https://staging.thewhizcells.com/devices/{device-name}/?ref=[[refid]]

Example for iPhone 15

https://staging.thewhizcells.com/devices/iphone-15/?ref=[[refid]]

Example with Specific Attributes

https://staging.thewhizcells.com/devices/iphone-15/?attribute_pa_carrier=unlocked&attribute_pa_storage=128gb&attribute_pa_condition=excellent&ref=[[refid]]

Step 3: Retrieving Available Offers

You can retrieve all available offers or filter them by brand and model:

Get All Offers

curl -X GET "https://staging.thewhizcells.com/wp-json/iox-recommerce/v1/offers?ref=[[refid]]" \
-H "Authorization: Bearer [[token]]"

Filter Offers by Brand and Model

curl -X GET "https://staging.thewhizcells.com/wp-json/iox-recommerce/v1/offers?ref=[[refid]]&brand=Apple&model=iPhone" \
-H "Authorization: Bearer [[token]]"

The response will include offer details such as price, condition, and a pre-formatted offer URL that includes your referral ID.

Step 4: Customer Journey and Order Placement

When a customer follows your attribution link, the system automatically tracks this as a click and sets a tracking cookie. Here's the typical customer journey:

  1. Customer clicks your attribution link (e.g., https://staging.thewhizcells.com/devices/iphone-15/?ref=[[refid]])
  2. The system records this click and associates it with your referral ID
  3. A tracking cookie is set in the customer's browser (valid for 30 days by default)
  4. The customer browses the site and selects a device to sell
  5. The customer completes the checkout process
  6. The order is created with your referral ID attached
  7. You earn commission based on the order amount

Step 5: Tracking Clicks

You can manually track clicks using the API:

curl -X POST "https://staging.thewhizcells.com/wp-json/iox-recommerce/v1/track/click" \
-H "Authorization: Bearer [[token]]" \
-H "Content-Type: application/json" \
-d '{"ref":"[[refid]]","product_id":123}'

A successful response will look like:

{
"success": true,
"click_id": 456
}

Step 6: Monitoring Your Performance

Get Total Clicks

To view the total number of clicks for your referral code:

curl -X GET "https://staging.thewhizcells.com/wp-json/iox-recommerce/v1/clicks?ref=[[refid]]&date_from=2025-07-01&date_to=2025-08-05" \
-H "Authorization: Bearer [[token]]"

The response will include:

  • Total clicks within the date range
  • Breakdown of clicks by date
  • Date range information

Get Order Information

To retrieve information about orders attributed to your referral code:

curl -X GET "https://staging.thewhizcells.com/wp-json/iox-recommerce/v1/orders?ref=[[refid]]&date_from=2025-07-01&date_to=2025-08-05" \
-H "Authorization: Bearer [[token]]"

You can filter orders by status:

  • pending: Orders that are awaiting shipment or arrival
  • completed: Orders that have been delivered
  • paid: Orders that have been paid

Example with status filter:

curl -X GET "https://staging.thewhizcells.com/wp-json/iox-recommerce/v1/orders?ref=[[refid]]&status=pending&date_from=2025-07-01&date_to=2025-08-05" \
-H "Authorization: Bearer [[token]]"

The response will include:

  • List of orders with details (status, amount, commission, etc.)
  • Summary information (total orders, total amount, total commission)
  • Date range information
  • Applied filter

Step 7: Understanding Order Statuses

Orders go through several statuses in The Whiz Cells system:

  1. awaiting-shipment: Customer has placed the order but hasn't shipped the device yet
  2. awaiting-arrival: Device has been shipped but hasn't arrived at The Whiz Cells
  3. delivered: Device has arrived at The Whiz Cells and is being processed
  4. paid: Payment has been sent to the customer
  5. completed: The entire transaction is complete

Commission is typically calculated when an order reaches the "paid" status, but this may vary based on your specific agreement.

Step 8: Troubleshooting

If you encounter issues with the API, check the following:

  1. Authentication Issues: Ensure your token is valid and properly formatted in the Authorization header
  2. Missing Parameters: Make sure all required parameters are included in your requests
  3. Date Format: Use YYYY-MM-DD format for date parameters
  4. Referral ID: Verify that you're using the correct referral ID

For additional support, contact The Whiz Cells technical team with your specific error messages and request details.

Conclusion

By following this guide, you can successfully integrate with The Whiz Cells ReCommerce API, track customer referrals, and monitor your performance metrics. The API provides comprehensive data to help you optimize your referral strategy and maximize your commission earnings.

Remember to use the staging environment (https://staging.thewhizcells.com) for testing before moving to the production environment.