Skip to content
PubAdHub
DATA MODEL Publisher

Affiliate Product Search

JSON object returned by GET /api/products/search. HTTP 200 covers both product matches and empty result sets.

Fields

keyword string

Echo of the search keyword.

results array

List of matching in-stock products (maximum 20).

message string (empty only)

Present when no products are returned: No result found.

id string

Product identifier. Shown in the success sample.

name string

Product title for display.

image_url URL

Product image URL.

final_price number

Current / sale price.

regular_price number

Regular / list price.

currency string

Currency code (for example USD).

on_sale boolean

Whether the product is on sale. Shown in the success sample.

redirect_url URL

Monetized PubAdHub tracking link. Use this for the Shop / Buy button.

merchant.name string

Merchant / store name.

availability string

Stock status (InStock).

Example Payload

affiliate-product_object.json
{
    "keyword": "iphone",
    "results": [
        {
            "id": "123456",
            "name": "Apple iPhone 15 128GB",
            "image_url": "https://...",
            "currency": "USD",
            "regular_price": 799,
            "final_price": 749,
            "on_sale": true,
            "availability": "InStock",
            "merchant": {
                "name": "Walmart"
            },
            "redirect_url": "https://ck.pubadhub.com/track?encyp=...&dl=..."
        }
    ]
}

Related Context