AliExpress Affiliate icon

AliExpress Affiliate

Use the AliExpress Affiliate API

Overview

The "Get Order List" operation of the AliExpress Affiliate node retrieves a list of orders from the AliExpress Affiliate API based on specified criteria such as order status and time range. This operation is useful for affiliates who want to track their sales performance, monitor order statuses, or analyze order data within a given period.

Typical use cases include:

  • Fetching all orders with a specific status (e.g., "Payment Completed") between two dates.
  • Paginating through large sets of order data by specifying page number and size.
  • Filtering orders by locale site to focus on specific regional markets.

For example, an affiliate marketer could use this node to automatically pull daily reports of completed orders to calculate commissions or reconcile sales data.

Properties

Name Meaning
Tracking ID Your tracking ID used to identify affiliate traffic and orders.
Page No Page number for paginated results (default 1).
Page Size Number of records per page, ranging from 1 to 50 (default 10).
Locale Site Local site filter for orders, options include: global, it_site, es_site, ru_site.
Order Status Status of the orders to retrieve. Options: Payment Completed, Buyer Confirmed Receipt, Completed Settlement, Invalid.
Time Type The type of time to query by, e.g., Payment Completed Time, Buyer Confirmed Receipt Time, Completed Settlement Time.
Start Time Start time of the query range in PST timezone (required).
End Time End time of the query range in PST timezone (required).

Output

The output is an array of JSON objects where each object corresponds to an order record returned by the AliExpress Affiliate API. The structure of each JSON object matches the API's response body for order lists, typically including details such as order IDs, status, timestamps, product information, and commission data.

No binary data output is produced by this operation.

Example output snippet (simplified):

[
  {
    "orderId": "123456789",
    "status": "Payment Completed",
    "paymentTime": "2024-05-01T12:00:00Z",
    "products": [
      {
        "productId": "987654321",
        "productName": "Sample Product",
        "quantity": 1,
        "commissionRate": "5%"
      }
    ],
    "trackingId": "yourTrackingID"
  }
]

Dependencies

  • Requires an API key credential for the AliExpress Affiliate API, including an API key, secret, and optionally a default tracking ID.
  • The node uses the AliExpress Affiliate API endpoint at https://api-sg.aliexpress.com/sync.
  • Proper configuration of the API credentials in n8n is necessary before using this node.

Troubleshooting

  • Missing Credentials: If the API key or secret is not provided, the node will throw an error "Missing required credential fields". Ensure that the API credentials are correctly set up in n8n.
  • No Credentials Returned: An error "No credentials returned!" indicates that the node failed to retrieve stored credentials. Verify credential configuration.
  • Unexpected API Response Structure: If the API response does not contain the expected body field, the node throws an error. This may indicate an API change or network issue.
  • API Request Errors: Network issues, invalid parameters, or expired credentials can cause request failures. The node logs errors and, if configured to continue on fail, outputs error messages in the JSON.
  • Invalid Parameter Values: For example, providing an invalid order status or improperly formatted date strings may result in API errors. Double-check parameter values against the API documentation.

Links and References

Discussion