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
}
Step 2: Creating Attribution Links
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:
- Customer clicks your attribution link (e.g.,
https://staging.thewhizcells.com/devices/iphone-15/?ref=[[refid]]) - The system records this click and associates it with your referral ID
- A tracking cookie is set in the customer's browser (valid for 30 days by default)
- The customer browses the site and selects a device to sell
- The customer completes the checkout process
- The order is created with your referral ID attached
- 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 arrivalcompleted: Orders that have been deliveredpaid: 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:
- awaiting-shipment: Customer has placed the order but hasn't shipped the device yet
- awaiting-arrival: Device has been shipped but hasn't arrived at The Whiz Cells
- delivered: Device has arrived at The Whiz Cells and is being processed
- paid: Payment has been sent to the customer
- 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:
- Authentication Issues: Ensure your token is valid and properly formatted in the Authorization header
- Missing Parameters: Make sure all required parameters are included in your requests
- Date Format: Use YYYY-MM-DD format for date parameters
- 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.