Skip to content

We call youDataFlair calls YOUR server. You implement this endpoint. You do not call DataFlair.

Fixtures ​

Fixtures are the documented examples as real files. Each one is a request that DataFlair sends and an answer that passes. The endpoint pages show these same files, so this folder, the pages and the conformance check cannot disagree.

Download all fixtures (.zip)

What is in the folder ​

FolderWhat it holds
exemplary/The happy path. One case for each endpoint.
supplemental/Errors and edge cases.

Each case is a folder with three files:

FileWhat it holds
request.jsonWhat DataFlair sends.
expected-response.jsonAn answer that passes.
case.jsonHow the check uses the case: the status it expects, the rules it applies, the docs section that explains it, and any value that was made up.

The cases ​

CaseCallWhat it checksStatus
exemplary/healthGET /healthReturns the account and its capabilities200
exemplary/inventoryGET /inventoryLists the bookable slots200
exemplary/forecastPOST /forecastReturns available and forecasted impressions200
exemplary/ordersPOST /ordersCreates a draft order201
exemplary/reportsPOST /reportsReturns impressions and clicks per line200
supplemental/health-bad-keyGET /healthA wrong key is a 401 with an error body401
supplemental/forecast-unknown-slotPOST /forecastAn unknown inventory_id is a 404 with an error body404
supplemental/orders-draft-onlyPOST /ordersA booking with no creative still returns draft line items that do not serve201 or 200
supplemental/orders-replayPOST /ordersA repeat of the same idempotency_key and body returns the same ids200
supplemental/orders-conflictPOST /ordersThe same idempotency_key with a different body is a 409409
supplemental/orders-updatePOST /ordersA new idempotency_key with the same external_ref updates the existing order200
supplemental/orders-unknown-slotPOST /ordersAn unknown inventory_id is a 404 with an error body404
supplemental/reports-dailyPOST /reportsgranularity daily returns a date on every row200

The draft-only rule as a test ​

The draft-only rule is a test here, not only a paragraph. The case supplemental/orders-draft-only sends a booking with no creative. The check then asserts that the order and every line item come back as DRAFT. An order that comes back as ACTIVE fails the case.

Values that were made up ​

Every value comes from an example already in these docs or in the OpenAPI file. Where a value had to be invented, the madeUp list in that case's case.json says so. These are all of them:

supplemental/health-bad-key

  • the wrong key value is generated by the checker
  • the expected error code unauthorized and message are examples. The contract does not fix them

supplemental/orders-conflict

  • line_items[0].goal_impressions is 200000, chosen only so the body differs from the exemplary case
  • the expected error code idempotency_conflict and message are examples. The contract does not fix them

supplemental/orders-draft-only

  • the DRAFT key, order name, external_refs and the ids in the expected response are derived by suffixing the example values

supplemental/orders-unknown-slot

  • the idempotency key, order name and external_refs are derived by suffixing the example values

The check tests the shape of an error, not its wording. It does not compare your code or message with the examples.

Use them ​

  • Replay them with the conformance check. It swaps in a slot from your own GET /inventory, so the example slot ids do not have to exist on your server.
  • Or replay one by hand. Send request.json to your server with curl, and compare the answer with expected-response.json. Your ids and numbers will differ. The fields and the states must match.

Docs version 1.0.1