Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Affiliate Links
  • Campaigns
    • Get All Campaigns
      GET
    • Get Campaign By ID
      GET
    • Create campaign
      POST
    • Update campaign
      PUT
    • Delete campaign
      DELETE
  • Affiliates
    • List affiliates
      GET
    • Get Affiliate By ID
      GET
    • Create Affiliate
      POST
    • Update Affiliate
      PUT
    • Delete Affiliate
      DELETE
  • Affiliate Links
    • Get Affiliate Link By Affiliate ID
      GET
    • Create Affiliate Link
      POST
    • Delete Affiliate Link
      DELETE
  • Comissions
    • Get All Commissions
      GET
    • Get Commission By ID
      GET
    • Create Commision
      POST
    • Update Commision
      PUT
    • Delete Commision
      DELETE
  • Referred Users
    • Get All Referred Users
      GET
    • Get Referred User by Email
      GET
    • Create Referred User
      POST
    • Update Referred User
      PUT
    • Delete Referred User
      DELETE
Getting StartedAPI Reference
Getting StartedAPI Reference
Help Center
Login
  1. Affiliate Links

Get Affiliate Link By Affiliate ID

GET
/links
Last modified:2025-12-29 19:24:36
Retrieves the referral link associated with a specific affiliate.
This endpoint accepts an affiliate ID as a query parameter and returns the corresponding link details if the affiliate exists.

Request

Query Params

Header Params

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/links?affiliateId=af1c9d21-3b4e-4f1a-9c12-9a1e2f3d4b5c' \
--header 'x-auth-referralstack: rs_live_e6761c15744c9be53be18802278fd3da751d03ce'

Responses

🟢200Success
application/json
Body

Example
{
    "status": 200,
    "message": "Links fetched successfully",
    "data": {
        "items": [
            {
                "id": "915e3617-627a-438f-a878-a80d30d0bc11",
                "referralCode": "REF-bb4bfb67",
                "url": "https://example.com?ref=REF-bb4bfb67",
                "urlParameter": "ref",
                "userId": "2d4c2004-5dcc-4251-947c-05caf702eff6",
                "affiliateId": "c04f7f0f-2a59-4133-bdb7-6f829aa6911c",
                "campaignId": "9112d17b-0c77-45ab-a82f-f963f135b63d",
                "totalOpens": 0,
                "totalClicks": 0,
                "totalSignups": 0,
                "totalEarnings": 0,
                "createdAt": "2025-07-16T01:56:24.024Z",
                "updatedAt": "2025-07-18T07:16:40.809Z"
            }
        ]
    }
}
🟠400Bad request (Missing AffiliateId)
🟠401Unauthorized (Missing API Key)
Modified at 2025-12-29 19:24:36
Previous
Delete Affiliate
Next
Create Affiliate Link
Built with