Skip to content

New Adapter: Sellwild - #4701

Open
nsp37 wants to merge 3 commits into
prebid:masterfrom
nsp37:sellwild-adapter
Open

nsp37 wants to merge 3 commits into
prebid:masterfrom
nsp37:sellwild-adapter

Conversation

@nsp37

@nsp37 nsp37 commented Nov 9, 2026 •

Copy link
Copy Markdown

🔧 Type of changes

  • new bid adapter
  • bid adapter update
  • new feature
  • new analytics adapter
  • new module
  • module update
  • bugfix
  • documentation
  • configuration
  • dependency update
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

Sellwild runs an OpenRTB 2.6 exchange that partners call server-to-server. Today partners reach it through a generic alias; this adapter replaces that with a named bidder. It supports banner, video and native for app and site requests. The matching PBS-Go adapter is prebid/prebid-server#5095.

Params:

Name Scope Type Description
partnerCode required string, ^[A-Za-z0-9_-]{1,64}$ Partner code assigned by Sellwild
token required string Partner auth token assigned by Sellwild

🧠 Rationale behind the change

This adapter isn't a generic alias because it doesn't just forward the ORTB:

  • Split by partner code and token. The partner code is part of the endpoint path (https://exchange.sellwild.com/exchange/openrtb2/{PublisherId}), and the exchange authenticates a request with its first imp's token. So imps are split into one outbound request per partner code and token, in first-seen order. Each outbound request contains only its own imps.
  • Bids matched to their own request. Each bid is resolved against the imps of the outbound request that received the response, even when bid.mtype is set. So in a split request a bid can't be attributed to another partner code's imp. A bid for an imp outside its request returns badServerResponse.
  • Media-type fallback. The exchange sets bid.mtype only when the underlying demand did. Without mtype, the type comes from the matching imp if that imp declares exactly one of banner, video or native. Otherwise the bid returns badServerResponse. Unsupported mtype values also return badServerResponse.
  • Token stays with Sellwild. imp.ext is forwarded unchanged. The exchange authenticates the partner from the token in imp.ext.bidder, so the token goes only to Sellwild. Bidder debug.allow is false, so the outbound body (and the token) isn't echoed in debug output.
  • Invalid imps are skipped, not fatal. Imps with missing bidder params or a blank partnerCode or token return badInput and are skipped. Valid imps in the same request still go out.

ExtImpSellwild.partnerCode carries @JsonProperty("partnerCode") because the default mapper is snake_case. The partner code is expanded through Uri.replaceMacro, which percent-encodes it, so HttpUtil.encodeUrl isn't applied as well.

🔎 New Bid Adapter Checklist

  • verify email contact works (support@sellwild.com; send a test message any time)
  • NO fully dynamic hostnames
  • geographic host parameters are NOT required
  • direct use of HTTP is prohibited - implement an existing Bidder interface that will do all the job
  • if the ORTB is just forwarded to the endpoint, use the generic adapter - define the new adapter as the alias of the generic adapter (not just forwarded; see rationale above)
  • cover an adapter configuration with an integration test

🧪 Test plan

  • SellwildBidderTest (20 tests) covers:
    • param parsing and validation;
    • splitting into one request per partner code and token, with order and imps preserved;
    • URL macro encoding (a b/c?d → a%20b%2Fc%3Fd);
    • headers, including x-openrtb-version: 2.6, and imp.ext forwarded unchanged;
    • bid types from mtype, the mtype fallback for single- and multi-format imps, and unsupported mtype;
    • empty responses and currency;
    • a bid with mtype set for another split request's imp, which is rejected.
  • SellwildTest integration test: an auction against the stubbed endpoint returns the expected response.
  • mvn checkstyle:check passes.
  • A full mvn test passes: 8956 tests, 0 failures. I ran it before the bid-to-request matching and the token split were added. After those changes I re-ran checkstyle, SellwildBidderTest and SellwildTest, all passing.
  • Built and tested with JDK 25 (maven:3.9-eclipse-temurin-25), which is the version master targets.

Maintainer contact: support@sellwild.com. Reviewers can get a test partner code and token there to make live requests; without them the endpoint returns 401.

Docs: prebid/prebid.github.io#6951.

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%? (JaCoCo on SellwildBidder: 99.0% of instructions, 98.8% of lines)
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

🤖 Generated with Claude Code

nsp37 added 2 commits November 9, 2026 16:00
The exchange authenticates a request with its first imp token, so imps
that share a partner code but carry different tokens now go out as
separate requests. Bidder debug is disabled because the token travels in
imp.ext.bidder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant