Data Sources
Sources represent the origin of your product data. They can be various platforms or systems from which you retrieve product information, including affiliate networks.
Types of Sources
Sources can include, but are not limited to:
- E-commerce platforms (Shopify)
- Affiliate networks (CJ, Awin, Impact.com, Partnerize, ShareASale, Rakuten)
- Custom data feeds or APIs
The full list of supported source types is defined in the SourceType
enum.
Source Operations
Query: getSources
Retrieves all registered sources.
This query returns an array of SourceSchema
objects.
Example:
Response:
Mutation: saveSource
Saves a new data source, including affiliate networks.
This mutation takes a SourceRequest
input and returns the ID of the newly created source.
Supported Affiliate Networks
Affiliate Network | Required Credentials | Variable Names |
---|---|---|
CJ | Access Token, Company ID (CID) | accessToken , companyId |
Awin | API Key | apiKey |
ShareASale | API Token, API Secret, Affiliate ID | apiToken , apiSecret , affiliateId |
ClickBank | API Key | apiKey |
FlexOffers | API Token | apiToken |
Rakuten | Security Key, Tracking ID | securityKey , trackingId |
Impact.com | Account SID, Auth Token | accountSid , authToken |
Example for Shopify:
Check built-with to validate whether a shop is using Shopify.
Example for CJ Affiliate:
Response:
Mutation: deleteSource
Deletes a saved data source.
Example:
Response:
Note on Credentials
For security reasons, sensitive credentials (like API keys) should be passed in the credentials
field of the SourceRequest
. These will be stored securely and cannot be retrieved once saved.
Credentials can be referenced in the ‘url’, ‘sourceHeaders’, and ‘sourceBody’ fields of the SourceRequest
object with the `$` syntax.
Example:
The CREDENTIAL_NAME
will be replaced with the decrypted value of the credential when the source is executed.