Getting Started
Follow the steps below to choose an API, get your credentials from the PubAdHub Console, and make your first request.
Choose an API
Official PDFs cover publisher APIs and a platform S2S postback API:
Publisher APIs
- Brand List API — GET
- Brand List by Traffic Type — GET
- RTB API — GET
- OpenRTB 2.5 — POST
- Revenue Share Report — POST
- Click-Level Conversion Report — POST
- Amazon Seller Product Search — GET
- Affiliate Product Search — GET
- Publisher S2S Integration — GET (PubAdHub calls your URL)
Platform APIs
- S2S Postback API — GET / POST
Get your credentials
Your Access Key and Publisher Key are available in the PubAdHub Console. Open your profile → Settings → Publisher Settings.
Access Key
Used as the AccessKey header on Brand List, Brand List by Traffic Type, Revenue Share, and Click-Level Conversion. Find it in Console → Publisher Settings.
Publisher Key
Used as the PublisherKey header on Amazon Seller Product Search and Affiliate Product Search. Find it in Console → Publisher Settings, or contact your Account Manager.
Publisher ID
Your Account Manager provides this value. The RTB serving engine sends it as the pubi query parameter. OpenRTB 2.5 sends your Publisher Identity as the {PublisherKey} path segment. That path value is not the PublisherKey header.
Platform Access Key
Used in the URL path for the Platform S2S Postback API. Contact your Account Manager for the platform access_key and postback URL. Do not reuse keys across platforms.
Publisher S2S URL
You host this URL. Share the full path with PubAdHub for the Publisher S2S Integration. PubAdHub sends HTTP GET conversion postbacks to it. No AccessKey header is used.
Authenticate
Use the scheme documented for the API you are calling. The PDFs do not document Bearer tokens.
AccessKey: {AccessKey}
PublisherKey: {PublisherKey}
GET http://rtb.pubadhub.com/serving-engine?pubi={PublisherID}&bd={BrandDomain}&cc={CountryCode}
POST http://rtb.pubadhub.com/openrtb/{PublisherKey} HTTP/1.1
Content-Type: application/json
Send a request
Amazon Seller Product Search includes a sample cURL call. Affiliate Product Search uses this request URL:
GET https://statsapi.pubadhub.com/api/products/search?keyword={keyword}&domain={domain}
Read the documented response
Affiliate Product Search returns HTTP 200 for successful searches, including empty results (message: No result found), HTTP 422 for validation failure, HTTP 401 when unauthorized, and HTTP 500 when search fails. RTB documents status 1 for success with ads and 0 for no ads or required-field errors. OpenRTB 2.5 returns HTTP 200 with a BidResponse on a fill, HTTP 204 with an empty body when there is no ad, and HTTP 400 with a JSON error when the call is invalid.
{
"status": 1,
"bid_amount": "0.20",
"redirect_url": "https://ck.pubadhub.com//track?encyp=...............",
"is_deeplink": "Yes"
}
Documented constraints
These constraints appear in the official PDFs: