What it is for
ads.txt and sellers.json tell you who may sell a publisher's ads. The schain tells you who actually handled a particular impression. A buyer can compare the two: is every company in the chain one the publisher authorized, and does each one exist in its ad system's sellers.json?
Where it appears
The schain sits in the source of an OpenRTB bid request. In OpenRTB 2.5 it is carried in source.ext.schain. OpenRTB 2.6 gives it its own place, source.schain.
An example
{
"ver": "1.0",
"complete": 1,
"nodes": [
{"asi": "exampleexchange.com", "sid": "12345", "hp": 1},
{"asi": "examplereseller.com", "sid": "abc-789", "hp": 1,
"rid": "req-001", "name": "Example Reseller"}
]
}The fields
- ver: the version of the schain specification.
- complete: 1 if the chain includes every party involved, back to the owner of the site or app; 0 if some are missing.
- nodes: the list of companies, in order.
- asi: the domain of the ad system the node is a seller at, the same name used in ads.txt.
- sid: the node's seller ID at that ad system, the same ID that appears in ads.txt and sellers.json.
- hp: 1 if the node is part of the flow of payment for the impression.
- rid: the request ID that node used.
- name and domain: optional, the node's business name and domain.
Reading the order
The first node is the party closest to the publisher. The last node is the party that sent the request to the buyer. Each node after the first is a company the previous one passed the inventory to.
How to verify each hop
- The publisher's ads.txt or app-ads.txt should list the first node's ad system and seller ID.
- Each node's seller ID should exist in the sellers.json of its ad system.
- The seller type in sellers.json should fit the node's role: a publisher account at the start, intermediaries after it.
- A chain marked complete should name everyone, so a missing hop is a warning.
- A chain that is not complete cannot be fully verified.
Common problems
- complete is 0, so the chain stops short of the publisher.
- A node's seller ID is not in the ad system's sellers.json.
- The first node is not authorized in the publisher's file.
- Nodes are in the wrong order, or the same hop appears twice.
- hp is missing or 0, which makes the chain hard to trust.
How to check one
Paste a bid request, or upload a log of them, into the Supply Chain (schain) Checker. It takes the schain of each request and checks every hop against sellers.json and ads.txt, and tells you why a hop passed or failed.