{
  "name": "rabattkodkollen-checkout-tests",
  "title": "Rabattkodkollen: checkout tests of discount codes in Swedish online shops",
  "description": "Results of automated tests of discount codes in the checkouts of Swedish online shops. Each row is one test: the day, the shop, where the code came from, whether the shop accepted it and, when it did, the discount on a test basket. No purchase is ever completed. The code strings themselves are not included.",
  "version": "2026-12-04",
  "created": "2026-12-04",
  "homepage": "https://rabattkodkollen.se/data/",
  "licenses": [
    {
      "name": "CC-BY-4.0",
      "title": "Creative Commons Attribution 4.0 International",
      "path": "https://creativecommons.org/licenses/by/4.0/"
    }
  ],
  "contributors": [
    {
      "title": "Rabattkodkollen",
      "path": "https://rabattkodkollen.se",
      "role": "author"
    }
  ],
  "keywords": [
    "discount codes",
    "coupon codes",
    "promo codes",
    "e-commerce",
    "checkout",
    "online shopping",
    "Sweden",
    "retail"
  ],
  "temporal": {
    "start": "2026-11-17",
    "end": "2026-12-04"
  },
  "resources": [
    {
      "name": "tests",
      "path": "tests.csv",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "dialect": {
        "delimiter": ",",
        "lineTerminator": "\n",
        "header": true
      },
      "schema": {
        "fields": [
          {
            "name": "test_no",
            "type": "integer",
            "description": "Row number, in the order the tests were run. Not an identifier used anywhere else."
          },
          {
            "name": "test_date",
            "type": "date",
            "description": "Day of the test (Europe/Stockholm). Clock times are not published."
          },
          {
            "name": "shop",
            "type": "string",
            "description": "Name of the shop."
          },
          {
            "name": "shop_domain",
            "type": "string",
            "description": "The shop's domain, without www. Key to shops.csv."
          },
          {
            "name": "code_key",
            "type": "string",
            "description": "Stands in for the code string, so that repeated tests of the same code can be followed. Numbered in the order codes were first tested; cannot be turned back into the code."
          },
          {
            "name": "code_source",
            "type": "string",
            "description": "Where the code came from: partner_feed = the shop issued the code to publishers through a partner programme; direct = the shop gave the code to Rabattkodkollen directly; web_shop = found on the shop's own website; web_coupon_site = found on another coupon or deal site; web_influencer = found in a public social media post.",
            "constraints": {
              "enum": [
                "partner_feed",
                "direct",
                "web_shop",
                "web_coupon_site",
                "web_influencer"
              ]
            }
          },
          {
            "name": "status",
            "type": "string",
            "description": "Result: accepted = the shop applied the code to the test basket; rejected = the shop refused it; min_spend = the code exists but needs a larger basket; needs_login = only for logged-in customers or members; could_not_test = no clear answer this time (shop blocked the test, no testable product, or the control code was accepted).",
            "constraints": {
              "enum": [
                "accepted",
                "rejected",
                "needs_login",
                "min_spend",
                "could_not_test"
              ]
            }
          },
          {
            "name": "discount_amount",
            "type": "number",
            "description": "Discount the shop took off the test basket, in `currency`. Only for accepted codes; 0 means accepted with no reduction on the test product."
          },
          {
            "name": "discount_percent",
            "type": "number",
            "description": "discount_amount as a percentage of the basket value before the discount, one decimal. Only where both were measured and the discount was above 0."
          },
          {
            "name": "currency",
            "type": "string",
            "description": "ISO 4217 currency of the basket, where the shop reported one."
          },
          {
            "name": "basket_band",
            "type": "string",
            "description": "Value of the test basket before the discount, as a band in `currency`. SEK: 0-199, 200-499, 500-999, 1000-1999, 2000+. EUR: 0-19, 20-49, 50-99, 100-199, 200+. Empty where the shop did not report a total."
          }
        ],
        "missingValues": [
          ""
        ],
        "primaryKey": "test_no",
        "foreignKeys": [
          {
            "fields": "shop_domain",
            "reference": {
              "resource": "shops",
              "fields": "shop_domain"
            }
          }
        ]
      }
    },
    {
      "name": "shops",
      "path": "shops.csv",
      "format": "csv",
      "mediatype": "text/csv",
      "encoding": "utf-8",
      "dialect": {
        "delimiter": ",",
        "lineTerminator": "\n",
        "header": true
      },
      "schema": {
        "fields": [
          {
            "name": "shop",
            "type": "string",
            "description": "Name of the shop."
          },
          {
            "name": "shop_domain",
            "type": "string",
            "description": "The shop's domain, without www."
          },
          {
            "name": "platform",
            "type": "string",
            "description": "E-commerce platform the test adapter was written for (woocommerce, shopify, sfcc, custom)."
          },
          {
            "name": "first_test_date",
            "type": "date",
            "description": "Day of the first test in this release."
          },
          {
            "name": "last_test_date",
            "type": "date",
            "description": "Day of the latest test in this release."
          },
          {
            "name": "tests",
            "type": "integer",
            "description": "Number of rows in tests.csv for the shop."
          },
          {
            "name": "codes_tested",
            "type": "integer",
            "description": "Number of different codes tested."
          },
          {
            "name": "tests_accepted",
            "type": "integer",
            "description": "Tests with status accepted."
          },
          {
            "name": "tests_rejected",
            "type": "integer",
            "description": "Tests with status rejected."
          },
          {
            "name": "tests_needs_login",
            "type": "integer",
            "description": "Tests with status needs_login."
          },
          {
            "name": "tests_min_spend",
            "type": "integer",
            "description": "Tests with status min_spend."
          },
          {
            "name": "tests_could_not_test",
            "type": "integer",
            "description": "Tests with status could_not_test."
          },
          {
            "name": "codes_accepted_latest",
            "type": "integer",
            "description": "Codes whose latest test was accepted."
          },
          {
            "name": "control_runs",
            "type": "integer",
            "description": "Test runs on the shop. Every run also tries one made-up code that cannot exist."
          },
          {
            "name": "control_rejected",
            "type": "integer",
            "description": "Runs in which the shop rejected the made-up code, as it should. Runs where it did not are stored as could_not_test."
          }
        ],
        "missingValues": [
          ""
        ],
        "primaryKey": "shop_domain"
      }
    }
  ]
}
