AliExpress Affiliate icon

AliExpress Affiliate

Use the AliExpress Affiliate API

Overview

This node integrates with the AliExpress Affiliate API to perform various affiliate-related operations. Specifically, for the "Get Categories" operation, it retrieves a list of product categories available through the AliExpress affiliate program. This is useful for affiliates who want to explore or filter products by category to create targeted promotions or reports.

Common scenarios include:

  • Fetching all available product categories to display in a UI or dropdown.
  • Using category data to filter product searches or promotional campaigns.
  • Automating affiliate marketing workflows that depend on category information.

Example: An affiliate marketer can use this node to get the latest categories from AliExpress and then dynamically generate affiliate links or product lists filtered by those categories.

Properties

Name Meaning
Tracking ID Your tracking ID used for affiliate link tracking. Optional; if not provided, uses default credential tracking ID.

Note: For the "Get Categories" operation, only the "Tracking ID" property is relevant based on the provided input properties and code.

Output

The node outputs an array of JSON objects, each representing the response body from the AliExpress API call for categories. The structure corresponds directly to the API's response format for category data, typically including category IDs, names, and possibly hierarchical relationships.

Output example (simplified):

[
  {
    "json": {
      "categories": [
        {
          "category_id": "123",
          "category_name": "Electronics"
        },
        {
          "category_id": "456",
          "category_name": "Home & Garden"
        }
      ]
    }
  }
]

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for the AliExpress Affiliate API, including an API key, secret, and optionally a default tracking ID.
  • Uses the AliExpress SDK client (IopClient) to communicate with the AliExpress API endpoint at https://api-sg.aliexpress.com/sync.
  • The node expects proper configuration of credentials within n8n to authenticate requests.

Troubleshooting

  • Missing Credentials: If the API key or secret is missing, the node will throw an error "Missing required credential fields". Ensure the API credentials are correctly set up in n8n.
  • No Credentials Returned: Error "No credentials returned!" indicates the node could not retrieve stored credentials. Verify credential availability and permissions.
  • API Response Issues: If the API response does not contain expected data, the node throws "Unexpected API response structure". This may indicate changes in the API or network issues.
  • Request Execution Errors: Network errors or invalid parameters will cause request failures. Enabling "Continue On Fail" allows processing subsequent items despite errors.
  • Tracking ID Usage: If no tracking ID is provided in the node parameters, the node uses the one from credentials. Providing an invalid tracking ID may affect affiliate tracking accuracy.

Links and References

Discussion