Developer

Affiliations

Signature, parameters, an example call and the sample response for every method in this group, generated from the contract.

lid.affiliations.list

products you're affiliated to: code, /ref link, clicks, conversions and earnings

Key permission: none (read)

lid.affiliations.list(input?, options?)

SDK
const result = await lid.affiliations.list();
Response
{
  "success": true,
  "data": []
}

lid.affiliations.create

join a product as an affiliate to earn commission

Key permission: catalogo (catalog)

lid.affiliations.create(input, options?)

NameTypeRequiredSource
productPdastringRequiredbody
SDK
const result = await lid.affiliations.create({
  productPda: '…',
});

Hand-written sample (not captured on devnet yet)

Response
{
  "success": true,
  "data": {
    "id": 42,
    "userId": 42,
    "collectionId": 1,
    "product_pda": "Lw3MD8mKVv9VRDUP8v1RAiQMW6V6BxgxFg6AS2i3oym2",
    "affiliateCode": "AB12CD",
    "clicks": 12,
    "conversions": 12,
    "earnings": 9.99,
    "active": true,
    "createdAt": "2026-09-20T15:04:05.000Z",
    "updatedAt": "2026-09-20T15:04:05.000Z",
    "affiliateUrl": "https://example.com/affiliateurl",
    "collection": {
      "id": "5a2f009f-6d9c-43bf-abae-ba0ccb7a5d72",
      "name": "Notion template pack",
      "image": "https://cdn.lid.pro/public/images/notion-template-pack.png",
      "transactionHash": "89EPF448FAeGiTLv966AE7GhuQohRX79kR28ztr3U7wTj1PLhgg1UaaubR238DrKrWhkmePEfF2p67iQ9MZ3wNvF",
      "symbol": "LID",
      "description": "Complete Notion template pack, updated quarterly.",
      "price": "9990000",
      "chainId": 101,
      "asset_type": "lidpro_product",
      "creator": "BVY9ezA35PWgW9m814JWXe5Kk4dy5ZE1ki3H6n34yonq",
      "creator_pubkey": "Nq7zQQ7EJfpc9PuBD4kG1a5Y8wEBmoaQChuwFdqN9MoG",
      "creatorInfo": {
        "username": "ana",
        "img_profile": "https://cdn.lid.pro/public/images/avatars/ana.png"
      },
      "tags": [
        "digital"
      ]
    }
  }
}