Skip to main content

Voonix Integration – Activities & Customers APIs

Written by Apurva Tiwari

Overview

Affnook provides two APIs that allow affiliates to retrieve their own activity and customer data:

  1. GET All Activities: Retrieves activity and transaction-related information.

  2. GET All Customers: Retrieves customer details associated with the affiliate.

Both APIs are affiliate-specific and only return data belonging to the affiliate whose credentials are used for authentication.

1. Authentication

Both APIs support either of the following authentication methods:

Method

Header

API Key

x-api-key: YOUR_AFFILIATE_API_KEY

Bearer Token

Authorization: Bearer YOUR_JWT_TOKEN

Important:

  • The credentials must belong to an affiliate user.

  • If an IP allow-list is configured for the API key, the request must originate from an allowed IP.

  • When using JWT authentication, include the organisation's URL in the Origin header:

2. GET All Activities API

This API retrieves activity records belonging to the authenticated affiliate.

Endpoint:

GET https://api.affnook.io/api/affiliate/v2/activities

Supported query parameters:

Parameter

Description

page

Page number (default: 1)

limit

Records per page (default: 20, maximum: 100)

start

Start date (YYYY-MM-DD)

end

End date (YYYY-MM-DD)

brand_id

Filter by brand ID

campaign_id

Filter by campaign ID

product_id

Filter by product ID

customer_id

Filter by customer ID

txnId

Filter by transaction ID

coupon

Filter by coupon

source

Filter by source

city

Filter by city

curr

Filter by currency

cridr

Filter customers registered within the selected date range

lta

Apply the Lifetime Activity filter

Sample Request:

curl -G "https://api.affnook.io/api/affiliate/v2/activities" \   -H "x-api-key: YOUR_AFFILIATE_API_KEY" \   --data-urlencode "page=1" \   --data-urlencode "limit=20" \   --data-urlencode "start=2026-07-15" \   --data-urlencode "end=2026-07-31"

Response includes: Transaction ID, activity date, status, customer details, financial information, brand, campaign, and product details.

3. GET All Customers API

This API retrieves customer records belonging to the authenticated affiliate.

Endpoint:

GET https://api.affnook.io/api/affiliate/v2/customers

Supported query parameters:

Parameter

Description

page

Page number (default: 1)

limit

Records per page (default: 100)

start

Start date (YYYY-MM-DD)

end

End date (YYYY-MM-DD)

customer_id

Filter by customer ID

campaign_id

Filter by campaign ID

product_id

Filter by product ID

brand_id

Filter by brand ID

city

Filter by city

country

Filter by country

source

Filter by source

customer_name

Search by customer name (partial match)

customer_email

Search by customer email (partial match)

trackingToken

Filter by tracking token

Sample Request:

curl -G "https://api.affnook.io/api/affiliate/v2/customers" \   -H "x-api-key: YOUR_AFFILIATE_API_KEY" \   --data-urlencode "page=1" \   --data-urlencode "limit=20" \   --data-urlencode "start=2026-07-15" \   --data-urlencode "end=2026-07-31"

Response includes: Customer ID, customer name, campaign, product, brand, affiliate details, registration date, last activity date, status, location, source, and tracking information.

4. Important Notes

  • Both APIs are accessible only to affiliate users.

  • The APIs automatically identify the affiliate through the authentication credentials. Passing an affiliate_id will not retrieve another affiliate's data.

  • Multiple IDs or values can be passed using repeated query parameters or comma-separated values.

  • The Customers API uses the organisation's configured timezone for date filters.

  • In the Activities API, affiliate_name and affiliate_id will return null. This is expected.

  • In the Customers API, affiliate_name and affiliate_id display the authenticated affiliate's details.

5. Common Errors

Status

Possible reason

401 – Not Authenticated

Missing or invalid API key/JWT.

403 – Not Authorized

Credentials do not belong to an affiliate user.

If authentication fails, verify the credentials, user role, and API key IP restrictions. For JWT requests, also verify the Origin header.


We are delighted to have assembled a world-class team of experienced professionals who are ready to take care of your queries and answer any questions you may have. Feel free to reach out to us at anytime by emailing us at [email protected] or by using the in-platform chat feature. We'd love to hear from you!

Did this answer your question?