Deals API 1.0 JSON Schema Unofficial

Decision records ·

D-020 What does a guaranteed deal do with units and totalcost, which "should be provided" if the deal is guaranteed?

Gap Cited on main and at the tag 1.0-202602.

What the schemas do

Two rules, at the should level: a deal whose guar is 1 and that sends no units, or no totalcost, gets a warning; the "may be omitted" sentences are informative.

Options

  • warning-rules Chosen

    Two rules, at the should level: a deal whose guar is 1 and that sends no units, or no totalcost, gets a warning; the "may be omitted" sentences are informative.

  • schema

    The schema requires units and totalcost when guar is 1.

Why

Each sentence says should, so a guaranteed deal that lacks one is still valid, and its rule warns. The "may be omitted" sentences only say what the others leave open for a deal that isn't guaranteed.

What we ask the specification to state

Write the level in capitals, and say whether a guaranteed deal without units or totalcost is valid.

The specification lines it rests on

Each line is quoted as the record pins it. Expand an item to read the quote.

main

  • Object: Terms, a requirement L115 at 3028ddc
    If the deal is guaranteed, this number should be provided.
  • Object: Terms, a requirement L116 at 3028ddc
    If the deal is guaranteed, this value should be provided.
  • Object: Terms, a requirement L115 at 3028ddc
    If the deal is not guaranteed this may be omitted.
  • Object: Terms, a requirement L116 at 3028ddc
    If the deal is not guaranteed this may be omitted.
  • Object: Terms, the units row L115 at 3028ddc
    units | int | Number of units (impressions) over the specified start and end date of the deal. If the deal is guaranteed, this number should be provided. If the deal is not guaranteed this may be omitted.
  • Object: Terms, the totalcost row L116 at 3028ddc
    totalcost | float | The total cost over the specified start and end date of the deal. If the deal is guaranteed, this value should be provided. If the deal is not guaranteed this may be omitted. See Implementation Guidance for additional detail
  • Object: Terms, the guar row L113 at 3028ddc
    guar | int | Indicates that the deal is of type guaranteed and the bidder must bid on the deal, where 0 = not a guaranteed deal, 1 = guaranteed deal.

Tag 1.0-202602

  • Object: Terms, a requirement L115 at 938a5d1
    If the deal is guaranteed, this number should be provided.
  • Object: Terms, a requirement L116 at 938a5d1
    If the deal is guaranteed, this value should be provided.
  • Object: Terms, a requirement L115 at 938a5d1
    If the deal is not guaranteed this may be omitted.
  • Object: Terms, a requirement L116 at 938a5d1
    If the deal is not guaranteed this may be omitted.
  • Object: Terms, the units row L115 at 938a5d1
    units | int | Number of units (impressions) over the specified start and end date of the deal. If the deal is guaranteed, this number should be provided. If the deal is not guaranteed this may be omitted.
  • Object: Terms, the totalcost row L116 at 938a5d1
    totalcost | float | The total cost over the specified start and end date of the deal. If the deal is guaranteed, this value should be provided. If the deal is not guaranteed this may be omitted. See Implementation Guidance for additional detail
  • Object: Terms, the guar row L113 at 938a5d1
    guar | int | Indicates that the deal is of type guaranteed and the bidder must bid on the deal, where 0 = not a guaranteed deal, 1 = guaranteed deal.

What it shapes

main: Terms.guar, Terms.totalcost, Terms.units

Tag 1.0-202602: Terms.guar, Terms.totalcost, Terms.units

The record's YAML file