{
  "product": "Books",
  "url": "https://wp2print.net/shop/books/",
  "price_page": "https://wp2print.net/shop/books/prices/",
  "currency": "USD",
  "prices_include_tax": false,
  "updated": "2024-04-16",
  "product_type": "book",
  "detail": "full",
  "rules": {
    "formula": "total = (printing_blackwhite[size,color](blackwhite_pages) + printing_color[size,color](color_pages) + cover_page[size,cover_page](books) + binding[size,binding](books)) × (1 + speed%)",
    "measures": {"blackwhite_pages": "books × Black/White pages per book", "color_pages": "books × Color pages per book", "books": "number of books"},
    "price_basis": "each price is the total for the number in its column, not a unit price",
    "lookup": "table[keys](measure) = the row whose keys match the chosen options, at the value of the measure",
    "interpolation": "linear",
    "above_max_column": "extrapolate_last_slope",
    "below_min_column": "proportional_to_first_column",
    "speed": "speed% is the percent of the chosen production speed",
    "min_books": 1
  },
  "options": {
    "size": ["A4", "A5", "Letter 8.5x11"],
    "color": ["1/0 Black/White front only", "1/1 Black/White both sides", "4/0 Full-color front only", "4/4 Full-color both sides"],
    "cover_page": ["None", "White card", "Transparent sheet"],
    "binding": ["Perfect", "Spiral"],
    "speed": ["Slow", "Fast", "Very fast"]
  },
  "tables": {
    "printing_blackwhite": {
      "price_of": "printing",
      "priced_by": "blackwhite_pages",
      "columns": [1, 100, 1000],
      "keys": ["size", "color"],
      "rows": [
        {"size": "A4", "color": "1/0 Black/White front only", "prices": [0.4, 40, 350]},
        {"size": "A4", "color": "1/1 Black/White both sides", "prices": [0.45, 45, 400]},
        {"size": "A5", "color": "1/0 Black/White front only", "prices": [0.3, 30, 270]},
        {"size": "A5", "color": "1/1 Black/White both sides", "prices": [0.35, 35, 310]},
        {"size": "Letter 8.5x11", "color": "1/0 Black/White front only", "prices": [0.4, 40, 350]},
        {"size": "Letter 8.5x11", "color": "1/1 Black/White both sides", "prices": [0.45, 45, 400]}
      ]
    },
    "printing_color": {
      "price_of": "printing",
      "priced_by": "color_pages",
      "columns": [1, 100, 1000],
      "keys": ["size", "color"],
      "rows": [
        {"size": "A4", "color": "4/0 Full-color front only", "prices": [0.5, 50, 450]},
        {"size": "A4", "color": "4/4 Full-color both sides", "prices": [0.6, 60, 550]},
        {"size": "A5", "color": "4/0 Full-color front only", "prices": [0.4, 40, 360]},
        {"size": "A5", "color": "4/4 Full-color both sides", "prices": [0.5, 50, 460]},
        {"size": "Letter 8.5x11", "color": "4/0 Full-color front only", "prices": [0.5, 50, 450]},
        {"size": "Letter 8.5x11", "color": "4/4 Full-color both sides", "prices": [0.6, 60, 550]}
      ]
    },
    "cover_page": {
      "price_of": "Cover Page",
      "priced_by": "books",
      "columns": [1, 10, 20],
      "keys": ["size", "cover_page"],
      "rows": [
        {"size": "A4", "cover_page": "None", "prices": [0, 0, 0]},
        {"size": "A4", "cover_page": "White card", "prices": [0.3, 3, 6]},
        {"size": "A4", "cover_page": "Transparent sheet", "prices": [0.25, 2.5, 5]},
        {"size": "A5", "cover_page": "None", "prices": [0, 0, 0]},
        {"size": "A5", "cover_page": "White card", "prices": [0.3, 3, 6]},
        {"size": "A5", "cover_page": "Transparent sheet", "prices": [2.5, 2.5, 2.5]},
        {"size": "Letter 8.5x11", "cover_page": "None", "prices": [0, 0, 0]},
        {"size": "Letter 8.5x11", "cover_page": "White card", "prices": [0.3, 3, 6]},
        {"size": "Letter 8.5x11", "cover_page": "Transparent sheet", "prices": [0.25, 2.5, 5]}
      ]
    },
    "binding": {
      "price_of": "Binding",
      "priced_by": "books",
      "columns": [1, 10, 20],
      "keys": ["size", "binding"],
      "rows": [
        {"size": "A4", "binding": "Perfect", "prices": [1, 10, 20]},
        {"size": "A4", "binding": "Spiral", "prices": [2, 20, 40]},
        {"size": "A5", "binding": "Perfect", "prices": [1, 10, 20]},
        {"size": "A5", "binding": "Spiral", "prices": [2, 20, 40]},
        {"size": "Letter 8.5x11", "binding": "Perfect", "prices": [1, 10, 20]},
        {"size": "Letter 8.5x11", "binding": "Spiral", "prices": [2, 20, 40]}
      ]
    }
  },
  "speed": [
    {"speed": "Slow", "percent": 0, "days": 5},
    {"speed": "Fast", "percent": 20, "days": 3},
    {"speed": "Very fast", "percent": 50, "days": 1}
  ],
  "example": {
    "input": {
      "books": 50,
      "size": "A4",
      "printing_blackwhite": {"pages_per_book": 40, "color": "1/0 Black/White front only"},
      "printing_color": {"pages_per_book": 8, "color": "4/0 Full-color front only"},
      "cover_page": "White card",
      "binding": "Perfect",
      "speed": "Fast"
    },
    "lines": [
      {"table": "printing_blackwhite", "blackwhite_pages": 2000, "price": 694.44},
      {"table": "printing_color", "color_pages": 400, "price": 183.33},
      {"table": "cover_page", "books": 50, "price": 15},
      {"table": "binding", "books": 50, "price": 50}
    ],
    "subtotal": 942.78,
    "speed_percent": 20,
    "total": 1131.33
  },
  "note": "Account or group pricing may differ. The price shown in the cart is authoritative.",
  "seller": {
    "name": "Acme Print Shop",
    "url": "https://wp2print.net/",
    "location": "Kittery, Maine, United States",
    "service_area": "Kittery, Eliot, York county and southern Maine"
  }
}
