Seamless Connectivity
with Our API
Effortlessly Integrate Crossworx and Transform Your Business Operations
Version from August 07, 2024 - 05:30 PM
API ENDPOINTS DOCUMENTATION
API Details
This page describes the endpoints accessible via our API.
Before using the API functions, an API key must be generated in the back office at dev.cwx.one (Sandbox) or my.cwx.one. This function can be found under “My Data” in the back office, where the API key can be generated.
When using the API, users must log in with their CWX-ID and this API key via Basic Authentication. The CWX-ID serves as the unique username, and the secret API key as the password.
• Sandbox Server: dev.cwx.one
• Live Server: my.cwx.one
To simulate, the following parameters from crossworkers (referrers) and product partners can be used in the DEV system. These are NOT valid in the live system:
• PP-ID: 64305446
• CWX-ID: 26455939
Important Note:
The coinX function does not necessarily have to be combined with the bonus. The bonus can stand alone. This applies in cases where a product partner does not wish to use coinX for discounting the shopping cart value.
Comprehensive free plugins already exist for the following eCommerce systems:
• Shopware AG: Crossworx Integration
Plugins for Shopify, OXID, WooCommerce, Prestashop, and others are currently in development. They will be published here.
Feel free to let me know if you need any further adjustments!
1. Check if a CWX-ID Exists
Endpoint: https://server/api/partner/check-cwx-id
Parameter:
• id - CWX-ID of the user
This query checks whether a provided Crossworx ID (CWX-ID) exists. It returns a positive or negative validation message.
2. Save a Bonus Transaction
Endpoint: https://server/api/partner/write-transaction
Parameters:
• ppnumber - CWX-ID of the product partner
• tpnumber - CWX-ID of the crossworker
• price - Transaction price
• ordernumber - Order number/transaction number for identification
This function records a Euro bonus transaction in the respective crossworker’s dataset. The system identifies which other crossworkers in the structure are also eligible for the bonus and automatically records the bonus for them as well. These values are processed in real-time in the app and displayed to the user.
3. Retrieve User’s CoinX Balance
Endpoint: https://server/api/partner/get-coinx-balance
Parameter:
• id - CWX-ID of the user
This query returns the CoinX balance of a user. It can be integrated at various points to check if the crossworker has sufficient CoinX to use in the current transaction.
4. Retrieve Maximum CoinX Value for Cart Amount
Endpoint: https://server/api/partner/get-max-coinx-discount
Parameters:
• id - CWX-ID of the product partner
• value - Cart value from which the maximum CoinX deduction is calculated
This query returns the maximum possible CoinX value for a cart amount. The underlying global value (as a percentage of the cart value) is set by the product partner in the secure back office and can be adjusted at any time. Based on this, the query calculates the maximum CoinX value that can be applied to the upcoming current transaction.
5. Redeem Crossworker’s CoinX at a Product Partner
Endpoint: https://server/api/coinx/redeem
Parameters:
• ppid - CWX-ID of the product partner
• tpid - CWX-ID of the crossworker
• coinx - Number of CoinX to be redeemed
• transaction_id - Receipt/transaction number for identification
This query transmits the redeemed CoinX of the respective transaction to the database and deducts this amount from the crossworker’s existing CoinX balance.
6. Retrieve Crossworker’s Referral Link
Endpoint: https://server/api/partner/get-referrer-link
Parameter:
• id - CWX-ID of the user
This function returns the referral link of a crossworker. This referral link is automatically generated during the registration of a crossworker and remains unchanged for a lifetime. It is available for retrieval from the database.
7. Register a New Crossworker
Endpoint: https://server/api/partner/register-crossworker
Parameters:
• xname - xname of the inviting user
• first_name - First name of the new user
• last_name - Last name of the new user
• email - Email address of the new user
This query sends the data for registering a new crossworker to the system. This enables the registration of a crossworker directly from the checkout area of an eCommerce shop without leaving it. The newly registered crossworker can immediately use the ID received via email to earn bonuses on the planned order.
8. Retrieve User’s Total Bonus Balance
Endpoint: https://server/api/partner/get-total-bonus
Parameter:
• id - CWX-ID of the user
This query returns the total balance of the bonuses accumulated so far.
9. Retrieval of one's own xName
Endpoint: https://server/api/partner/get-xname
Parameter:
• none
Returns the xName of the currently authenticated user in the API.
New Feature
Seamless Registration Integration with Crossworx Snippet
We are excited to introduce a new feature that allows you to seamlessly integrate the registration process for new Crossworx users into any website.
This flexible solution ensures that the registration process is smooth and efficient, while maintaining the integrity of user assignments through the use of the xName.
With this iframe integration, you can now easily embed the registration process on your website, allowing new users to join the Crossworx community directly from your platform. This feature ensures that every new user is correctly associated with the inviting person, thanks to the unique xName identifier.
Whether you’re a business looking to expand your network or an individual aiming to grow your community, this integration offers a simple and effective way to connect more people to Crossworx.
<iframe id="cwx-quick-register" src="https://my.cwx.one/quick-register-form" style="height:500px; width:100%;"></iframe>