{
  "openapi": "3.1.0",
  "info": {
    "title": "Fentlig API",
    "version": "1.0.0",
    "description": "Swedish public procurement notices as JSON, addressed by the same slug as the pages on https://fentlig.se/upphandlingar.\n\nEvery notice answer carries a `coverage` object: which sources the data is drawn from, how current it is, and the credit to reproduce if you republish it. The data is part of the Swedish market, not all of it, so read an empty result as nothing published here rather than nothing there.\n\nEvery error is an RFC 9457 problem document, and its `type` links to a page explaining it. Every answer carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`, and a 429 also carries `Retry-After`. This document is served at https://api.fentlig.se/openapi.json."
  },
  "servers": [
    {
      "url": "https://api.fentlig.se",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Notices",
      "description": "Published procurement notices: prior information, calls for tenders and result notices, each procurement listed once. A single notice is open to any caller; listing needs an API key."
    }
  ],
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key, sent as `Authorization: Bearer fent_sk_...` and never in the query string. An account owner issues keys in account settings, and each key carries the scopes it was issued with."
      }
    },
    "schemas": {},
    "parameters": {}
  },
  "paths": {
    "/v1/notices": {
      "get": {
        "operationId": "listNotices",
        "tags": [
          "Notices"
        ],
        "summary": "List procurements, or look up one notice by slug",
        "description": "Returns published procurements, one row per procurement, each shown by one of its notices: the result notice once one is published, otherwise the call for tenders, otherwise the prior information notice. A filter matches a procurement when it matches any of its notices, and `pagination.total` counts procurements. Listing needs an API key carrying `notices:search`; `evaluation_method`, `quality_weight_min`, `contract_months_min` and `contract_months_max` also need `analysis:read`, and `document_search` needs `documents:read`. With `?slug=` no key is needed, and the answer is the one notice that slug names. Without a key, the same notices are published as pages at https://fentlig.se/upphandlingar and in https://fentlig.se/llms.txt.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "description": "Which page of results, counting from 1. `(page - 1) x limit` must be below 1000.",
              "example": 2
            },
            "required": false,
            "description": "Which page of results, counting from 1. `(page - 1) x limit` must be below 1000.",
            "name": "page",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20,
              "description": "How many procurements per page.",
              "example": 50
            },
            "required": false,
            "description": "How many procurements per page.",
            "name": "limit",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Which markets, by the buyer's country: ISO 3166-1 alpha-2 codes separated by commas, or `all`. Defaults to `SE`. A caller without a key carrying `notices:search` always reads `SE`.",
              "example": "SE,FI"
            },
            "required": false,
            "description": "Which markets, by the buyer's country: ISO 3166-1 alpha-2 codes separated by commas, or `all`. Defaults to `SE`. A caller without a key carrying `notices:search` always reads `SE`.",
            "name": "country",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "exclude",
                "include"
              ],
              "description": "`include` adds the notices whose buyer is outside the named countries and whose work is performed in one of them. Defaults to `exclude`.",
              "example": "include"
            },
            "required": false,
            "description": "`include` adds the notices whose buyer is outside the named countries and whose work is performed in one of them. Defaults to `exclude`.",
            "name": "foreign_buyers",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "planned",
                  "open",
                  "closed",
                  "concluded"
                ]
              },
              "description": "The procurement's position, one or more separated by commas: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure.",
              "example": [
                "open",
                "planned"
              ]
            },
            "required": false,
            "description": "The procurement's position, one or more separated by commas: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure.",
            "style": "form",
            "explode": false,
            "name": "status",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^[A-Z]{2}[0-9A-Z]{0,3}$"
              },
              "description": "Where the work is performed, as NUTS codes separated by commas. A code matches every code below it, so `SE11` covers `SE110`. Notices whose work can be performed anywhere in the country are included, since they can be performed in the region too; see `nationwide`. Without `sort`, the notices placed in the named regions come first.",
              "example": [
                "SE11",
                "SE232"
              ]
            },
            "required": false,
            "description": "Where the work is performed, as NUTS codes separated by commas. A code matches every code below it, so `SE11` covers `SE110`. Notices whose work can be performed anywhere in the country are included, since they can be performed in the region too; see `nationwide`. Without `sort`, the notices placed in the named regions come first.",
            "style": "form",
            "explode": false,
            "name": "region",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "include",
                "exclude"
              ],
              "description": "With `region`: `exclude` leaves out notices whose work can be performed anywhere in the country, except those a municipality or region in the named regions published. Defaults to `include`. Without `region` it changes nothing.",
              "example": "exclude"
            },
            "required": false,
            "description": "With `region`: `exclude` leaves out notices whose work can be performed anywhere in the country, except those a municipality or region in the named regions published. Defaults to `include`. Without `region` it changes nothing.",
            "name": "nationwide",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{2,8}$"
              },
              "description": "What is bought, as CPV codes of 2 to 8 digits separated by commas, with or without the check digit. A code matches every code that begins with it, so `45` covers all construction work.",
              "example": [
                "45",
                "71"
              ]
            },
            "required": false,
            "description": "What is bought, as CPV codes of 2 to 8 digits separated by commas, with or without the check digit. A code matches every code that begins with it, so `45` covers all construction work.",
            "style": "form",
            "explode": false,
            "name": "cpv",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              },
              "description": "Part of a buyer's name, case-insensitive; several separated by commas match any of them. For an exact buyer, use `buyer_id`.",
              "example": [
                "Trafikverket"
              ]
            },
            "required": false,
            "description": "Part of a buyer's name, case-insensitive; several separated by commas match any of them. For an exact buyer, use `buyer_id`.",
            "style": "form",
            "explode": false,
            "name": "buyer",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "description": "Buyers by id, separated by commas: the `buyerId` of a notice in an earlier answer.",
              "example": [
                "0b9f2d1e-6c3a-4a57-9a51-2f0f4e9f3c11"
              ]
            },
            "required": false,
            "description": "Buyers by id, separated by commas: the `buyerId` of a notice in an earlier answer.",
            "style": "form",
            "explode": false,
            "name": "buyer_id",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "Free text matched against the notices of a procurement. Words separated by spaces must all match. `OR` (or `ELLER`) between two words matches either and binds tighter than the space, so `skolmat frukost OR lunch` needs `skolmat` and one of the other two. A word also matches the longer words that begin with it, so `samlastning` finds `samlastningscentral`; a few very common beginnings match only the whole word. Text in double quotes is a phrase: those words, in that order. A leading minus excludes a word or a phrase. A search needs at least one word that is not excluded and does not appear in most notices, or it is refused.",
              "example": "skolmat frukost OR lunch -\"catering\""
            },
            "required": false,
            "description": "Free text matched against the notices of a procurement. Words separated by spaces must all match. `OR` (or `ELLER`) between two words matches either and binds tighter than the space, so `skolmat frukost OR lunch` needs `skolmat` and one of the other two. A word also matches the longer words that begin with it, so `samlastning` finds `samlastningscentral`; a few very common beginnings match only the whole word. Text in double quotes is a phrase: those words, in that order. A leading minus excludes a word or a phrase. A search needs at least one word that is not excluded and does not appear in most notices, or it is refused.",
            "name": "search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 200,
              "description": "Text matched against the tender documents published with a procurement rather than the notice, in the same syntax as `search`. Needs a key carrying `documents:read`. The answer then carries `documentSearch`, and each row a `documentMatch` quoting the passage.",
              "example": "ISO 14001"
            },
            "required": false,
            "description": "Text matched against the tender documents published with a procurement rather than the notice, in the same syntax as `search`. Needs a key carrying `documents:read`. The answer then carries `documentSearch`, and each row a `documentMatch` quoting the passage.",
            "name": "document_search",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Procurements whose call for tenders closes at or after this moment. A UTC date and time in RFC 3339 form.",
              "example": "2026-10-01T00:00:00Z"
            },
            "required": false,
            "description": "Procurements whose call for tenders closes at or after this moment. A UTC date and time in RFC 3339 form.",
            "name": "deadline_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Procurements whose call for tenders closes before this moment. A UTC date and time in RFC 3339 form.",
              "example": "2026-12-31T23:59:59Z"
            },
            "required": false,
            "description": "Procurements whose call for tenders closes before this moment. A UTC date and time in RFC 3339 form.",
            "name": "deadline_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Procurements with a notice published at or after this moment. A UTC date and time in RFC 3339 form.",
              "example": "2026-10-01T00:00:00Z"
            },
            "required": false,
            "description": "Procurements with a notice published at or after this moment. A UTC date and time in RFC 3339 form.",
            "name": "publication_after",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "format": "date-time",
              "description": "Procurements with a notice published before this moment. A UTC date and time in RFC 3339 form.",
              "example": "2026-12-31T23:59:59Z"
            },
            "required": false,
            "description": "Procurements with a notice published before this moment. A UTC date and time in RFC 3339 form.",
            "name": "publication_before",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "description": "Smallest estimated value, compared in the currency the notice states it in, without conversion.",
              "example": 500000
            },
            "required": false,
            "description": "Smallest estimated value, compared in the currency the notice states it in, without conversion.",
            "name": "min_value",
            "in": "query"
          },
          {
            "schema": {
              "type": "number",
              "description": "Largest estimated value, compared in the currency the notice states it in, without conversion.",
              "example": 5000000
            },
            "required": false,
            "description": "Largest estimated value, compared in the currency the notice states it in, without conversion.",
            "name": "max_value",
            "in": "query"
          },
          {
            "schema": {
              "type": "boolean",
              "description": "`true` leaves out procurements whose deadline has passed. `false` is the same as leaving it out.",
              "example": true
            },
            "required": false,
            "description": "`true` leaves out procurements whose deadline has passed. `false` is the same as leaving it out.",
            "name": "exclude_past_deadline",
            "in": "query"
          },
          {
            "schema": {
              "type": "boolean",
              "description": "`true` keeps procurements with a result notice on which at least one lot ended with no contract awarded: work the buyer may put out to tender again. Pair it with `publication_after` for recent ones. `false` is the same as leaving it out.",
              "example": true
            },
            "required": false,
            "description": "`true` keeps procurements with a result notice on which at least one lot ended with no contract awarded: work the buyer may put out to tender again. Pair it with `publication_after` for recent ones. `false` is the same as leaving it out.",
            "name": "closed_without_award",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "publication_desc",
                "deadline_asc",
                "value_desc"
              ],
              "description": "`publication_desc` is newest first, `deadline_asc` soonest deadline first, `value_desc` highest estimated value first, compared in euro. Without it, a query for open procurements alone is ordered by deadline and anything else by publication, newest first.",
              "example": "deadline_asc"
            },
            "required": false,
            "description": "`publication_desc` is newest first, `deadline_asc` soonest deadline first, `value_desc` highest estimated value first, compared in euro. Without it, a query for open procurements alone is ordered by deadline and anything else by publication, newest first.",
            "name": "sort",
            "in": "query"
          },
          {
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "price",
                  "cost",
                  "meat",
                  "unknown"
                ]
              },
              "description": "How tenders are evaluated, one or more separated by commas: `price` is lowest price alone; `cost` is lowest cost, such as a life-cycle cost; `meat` is the most economically advantageous tender, weighing quality against price or cost; `unknown` is a procurement whose documents do not say. Needs a key carrying `analysis:read`.",
              "example": [
                "meat"
              ]
            },
            "required": false,
            "description": "How tenders are evaluated, one or more separated by commas: `price` is lowest price alone; `cost` is lowest cost, such as a life-cycle cost; `meat` is the most economically advantageous tender, weighing quality against price or cost; `unknown` is a procurement whose documents do not say. Needs a key carrying `analysis:read`.",
            "style": "form",
            "explode": false,
            "name": "evaluation_method",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100,
              "description": "Smallest weight quality carries in the evaluation, in percent. Needs a key carrying `analysis:read`.",
              "example": 40
            },
            "required": false,
            "description": "Smallest weight quality carries in the evaluation, in percent. Needs a key carrying `analysis:read`.",
            "name": "quality_weight_min",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Procurements whose longest possible contract period, in months, is at least this. Needs a key carrying `analysis:read`.",
              "example": 12
            },
            "required": false,
            "description": "Procurements whose longest possible contract period, in months, is at least this. Needs a key carrying `analysis:read`.",
            "name": "contract_months_min",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Procurements whose longest possible contract period, in months, is at most this. Needs a key carrying `analysis:read`.",
              "example": 48
            },
            "required": false,
            "description": "Procurements whose longest possible contract period, in months, is at most this. Needs a key carrying `analysis:read`.",
            "name": "contract_months_max",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "description": "The last segment of a notice's page on fentlig.se, `https://fentlig.se/upphandling/{slug}`. With it, the answer is that one notice, in the same body as `GET /v1/notices/{id}`, and no API key is needed. The other parameters are then ignored.",
              "example": "ramavtal-livsmedel-a1b2c3d4e5"
            },
            "required": false,
            "description": "The last segment of a notice's page on fentlig.se, `https://fentlig.se/upphandling/{slug}`. With it, the answer is that one notice, in the same body as `GET /v1/notices/{id}`, and no API key is needed. The other parameters are then ignored.",
            "name": "slug",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of procurements; or, with `?slug=`, the one notice it names",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the current window ends, as a Unix timestamp in seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The notice's id. It never changes, and `GET /v1/notices/{id}` answers with it."
                              },
                              "slug": {
                                "type": "string",
                                "description": "The last segment of the notice's page on fentlig.se, `https://fentlig.se/upphandling/{slug}`. It follows the title, so it changes when a correction rewords the title; the id does not."
                              },
                              "title": {
                                "type": "string",
                                "description": "The notice's title, as the buyer wrote it."
                              },
                              "buyerName": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The buyer's name, as the notice gives it. Null when the notice names no buyer."
                              },
                              "buyerId": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "uuid",
                                "description": "The buyer as an organization, for the `buyer_id` filter. Several spellings of one buyer's name share this id. Null when the buyer could not be matched to an organization."
                              },
                              "buyerUnit": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "The name of the unit that ran the procurement: a department of the buyer, or a joint procurement centre."
                                  },
                                  "kind": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "enum": [
                                      "joint_centre",
                                      null
                                    ],
                                    "description": "`joint_centre` when the unit is a joint procurement centre that tenders on behalf of several organizations; null for a department of the buyer."
                                  },
                                  "id": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The joint procurement centre's stable identifier, or null for a department."
                                  }
                                },
                                "required": [
                                  "name",
                                  "kind",
                                  "id"
                                ],
                                "description": "The unit that ran the procurement, when the notice names one: a department of the buyer, or a joint procurement centre tendering for several organizations. Null when the notice names the buyer itself."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "planned",
                                  "open",
                                  "closed",
                                  "concluded"
                                ],
                                "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                              },
                              "publicationDate": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the notice was published, as an RFC 3339 timestamp in UTC. A source that gives only the day is stored at 00:00 UTC on that day, so read the date part as the calendar day."
                              },
                              "deadlineDate": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "format": "date-time",
                                "description": "When tenders must be in, as an RFC 3339 timestamp in UTC carrying the time of day the notice states. Null when the notice states no deadline."
                              },
                              "regionCodes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "Where the work is performed, as NUTS codes. `anyw` is anywhere, `anyw-eea` anywhere in the EEA."
                              },
                              "mainCpv": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "description": "The CPV code: eight digits, without the check digit."
                                  },
                                  "label": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The code's name in Swedish. Null for a code the CPV vocabulary does not name."
                                  },
                                  "isMain": {
                                    "type": "boolean",
                                    "description": "True for the code the notice gives as its main one."
                                  }
                                },
                                "required": [
                                  "code",
                                  "label",
                                  "isMain"
                                ],
                                "description": "The notice's main CPV code. Null when it gives none."
                              },
                              "procedureCode": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The procedure, as a code from the EU procurement procedure type list (http://publications.europa.eu/resource/authority/procurement-procedure-type) with hyphens written as underscores, such as `open`, `restricted` or `neg_w_call`. Swedish procedures that list has no code for are `direct` (direct award), `simplified` and `selective`, and `other` is a procedure the notice names without a code. Null when the notice gives none."
                              },
                              "estimatedValue": {
                                "type": [
                                  "number",
                                  "null"
                                ],
                                "description": "The value the buyer estimated, in `currency`. Null when the notice states none."
                              },
                              "currency": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The ISO 4217 code of the currency `estimatedValue` and `frameworkMaxValue` are stated in, such as `SEK` or `EUR`. Null when the notice states no value."
                              },
                              "source": {
                                "type": "string",
                                "description": "Where the notice came from: `TED`, or `Fentlig` for a notice Fentlig compiled from the platforms where buyers advertise. `sourceUrl` links the original."
                              },
                              "sourceUrl": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The notice at the place it was published. Null when there is no address to link to."
                              },
                              "documentMatch": {
                                "type": [
                                  "object",
                                  "null"
                                ],
                                "properties": {
                                  "documentId": {
                                    "type": "string",
                                    "format": "uuid",
                                    "description": "Identifies the document the words were found in."
                                  },
                                  "snippet": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The passage the words were found in, with each hit marked. Null when there is no passage to show; see tooLongToQuote."
                                  },
                                  "tooLongToQuote": {
                                    "type": "boolean",
                                    "description": "True when the documents match but the passage sits beyond the stretch of a long document a quote is cut from. The match is real and no passage is attached."
                                  }
                                },
                                "required": [
                                  "documentId",
                                  "snippet",
                                  "tooLongToQuote"
                                ],
                                "description": "Where `document_search` matched this procurement's documents. Null when `document_search` was not used."
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "title",
                              "buyerName",
                              "buyerId",
                              "buyerUnit",
                              "status",
                              "publicationDate",
                              "deadlineDate",
                              "regionCodes",
                              "mainCpv",
                              "procedureCode",
                              "estimatedValue",
                              "currency",
                              "source",
                              "sourceUrl",
                              "documentMatch"
                            ]
                          },
                          "description": "One row per procurement, drawn from one of its notices."
                        },
                        "pagination": {
                          "type": "object",
                          "properties": {
                            "page": {
                              "type": "number",
                              "description": "This page, counting from 1."
                            },
                            "limit": {
                              "type": "number",
                              "description": "The page size asked for."
                            },
                            "total": {
                              "type": "number",
                              "description": "How many items match in total, which can be more than paging reaches."
                            },
                            "totalPages": {
                              "type": "number",
                              "description": "How many pages `total` fills at `limit`."
                            },
                            "hasNextPage": {
                              "type": "boolean",
                              "description": "True when a later page exists."
                            },
                            "hasPreviousPage": {
                              "type": "boolean",
                              "description": "True when this is not the first page."
                            }
                          },
                          "required": [
                            "page",
                            "limit",
                            "total",
                            "totalPages",
                            "hasNextPage",
                            "hasPreviousPage"
                          ]
                        },
                        "documentSearch": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "withDocuments": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Procurements in this filter set whose documents are available to search. This is the denominator for any count taken from document_search: a match cannot exist outside this set, so report 'N of withDocuments procurements whose documents are available', never 'N of inScope' and never 'N in Sweden'."
                            },
                            "inScope": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "Procurements matching the other filters, whether or not their documents are available. The difference inScope minus withDocuments was not searched at all, so those procurements are neither matches nor non-matches and their absence from the results is not evidence about them."
                            }
                          },
                          "required": [
                            "withDocuments",
                            "inScope"
                          ],
                          "description": "How much of the filtered set `document_search` could read. Null when `document_search` was not used."
                        },
                        "coverage": {
                          "type": "object",
                          "properties": {
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Where the data in this answer was published, such as `TED`, `Upphandlingsmyndigheten`, or `Fentlig` for notices Fentlig compiled from the platforms where buyers advertise."
                            },
                            "attribution": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "source": {
                                    "type": "string",
                                    "description": "The source this line credits, as it is named in `sources`."
                                  },
                                  "text": {
                                    "type": "string",
                                    "description": "The credit line, to be reproduced word for word wherever the data is republished."
                                  }
                                },
                                "required": [
                                  "source",
                                  "text"
                                ]
                              },
                              "description": "One credit line for each source in `sources` whose terms ask for one."
                            },
                            "dataAsOf": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time",
                              "description": "When the most recently published record in the covered set was published, as an RFC 3339 timestamp in UTC. Null when the set is empty."
                            },
                            "isComplete": {
                              "type": "boolean",
                              "enum": [
                                false
                              ],
                              "description": "Always false: this is part of the market, not all of it. A procurement missing from an answer may still exist."
                            },
                            "note": {
                              "type": "string",
                              "description": "What the data covers, in a sentence or two."
                            }
                          },
                          "required": [
                            "sources",
                            "attribution",
                            "dataAsOf",
                            "isComplete",
                            "note"
                          ],
                          "description": "What the answer is drawn from, how current it is, and the credit to reproduce when republishing it."
                        }
                      },
                      "required": [
                        "data",
                        "pagination",
                        "documentSearch",
                        "coverage"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "The notice's id. It never changes, and `GET /v1/notices/{id}` answers with it."
                            },
                            "slug": {
                              "type": "string",
                              "description": "The last segment of the notice's page on fentlig.se, `https://fentlig.se/upphandling/{slug}`. It follows the title, so it changes when a correction rewords the title; the id does not."
                            },
                            "title": {
                              "type": "string",
                              "description": "The notice's title, as the buyer wrote it."
                            },
                            "buyerName": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The buyer's name, as the notice gives it. Null when the notice names no buyer."
                            },
                            "buyerId": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "uuid",
                              "description": "The buyer as an organization, for the `buyer_id` filter. Several spellings of one buyer's name share this id. Null when the buyer could not be matched to an organization."
                            },
                            "buyerUnit": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the unit that ran the procurement: a department of the buyer, or a joint procurement centre."
                                },
                                "kind": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "enum": [
                                    "joint_centre",
                                    null
                                  ],
                                  "description": "`joint_centre` when the unit is a joint procurement centre that tenders on behalf of several organizations; null for a department of the buyer."
                                },
                                "id": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "The joint procurement centre's stable identifier, or null for a department."
                                }
                              },
                              "required": [
                                "name",
                                "kind",
                                "id"
                              ],
                              "description": "The unit that ran the procurement, when the notice names one: a department of the buyer, or a joint procurement centre tendering for several organizations. Null when the notice names the buyer itself."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "planned",
                                "open",
                                "closed",
                                "concluded"
                              ],
                              "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                            },
                            "publicationDate": {
                              "type": "string",
                              "format": "date-time",
                              "description": "When the notice was published, as an RFC 3339 timestamp in UTC. A source that gives only the day is stored at 00:00 UTC on that day, so read the date part as the calendar day."
                            },
                            "deadlineDate": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time",
                              "description": "When tenders must be in, as an RFC 3339 timestamp in UTC carrying the time of day the notice states. Null when the notice states no deadline."
                            },
                            "regionCodes": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Where the work is performed, as NUTS codes. `anyw` is anywhere, `anyw-eea` anywhere in the EEA."
                            },
                            "mainCpv": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "code": {
                                  "type": "string",
                                  "description": "The CPV code: eight digits, without the check digit."
                                },
                                "label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "The code's name in Swedish. Null for a code the CPV vocabulary does not name."
                                },
                                "isMain": {
                                  "type": "boolean",
                                  "description": "True for the code the notice gives as its main one."
                                }
                              },
                              "required": [
                                "code",
                                "label",
                                "isMain"
                              ],
                              "description": "The notice's main CPV code. Null when it gives none."
                            },
                            "procedureCode": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The procedure, as a code from the EU procurement procedure type list (http://publications.europa.eu/resource/authority/procurement-procedure-type) with hyphens written as underscores, such as `open`, `restricted` or `neg_w_call`. Swedish procedures that list has no code for are `direct` (direct award), `simplified` and `selective`, and `other` is a procedure the notice names without a code. Null when the notice gives none."
                            },
                            "estimatedValue": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "The value the buyer estimated, in `currency`. Null when the notice states none."
                            },
                            "currency": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The ISO 4217 code of the currency `estimatedValue` and `frameworkMaxValue` are stated in, such as `SEK` or `EUR`. Null when the notice states no value."
                            },
                            "source": {
                              "type": "string",
                              "description": "Where the notice came from: `TED`, or `Fentlig` for a notice Fentlig compiled from the platforms where buyers advertise. `sourceUrl` links the original."
                            },
                            "sourceUrl": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The notice at the place it was published. Null when there is no address to link to."
                            },
                            "description": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The notice's description, as the buyer wrote it, with email addresses and phone numbers removed. Null when the notice has none."
                            },
                            "cpvCodes": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "description": "The CPV code: eight digits, without the check digit."
                                  },
                                  "label": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The code's name in Swedish. Null for a code the CPV vocabulary does not name."
                                  },
                                  "isMain": {
                                    "type": "boolean",
                                    "description": "True for the code the notice gives as its main one."
                                  }
                                },
                                "required": [
                                  "code",
                                  "label",
                                  "isMain"
                                ]
                              },
                              "description": "Every CPV code on the notice, the main one first."
                            },
                            "regions": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "code": {
                                    "type": "string",
                                    "description": "A NUTS code, or `anyw` or `anyw-eea`."
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ],
                                    "description": "The place's name in Swedish, such as `Hela Sverige` for work performed anywhere in Sweden or `Var som helst` for `anyw`. Null for a code without one."
                                  }
                                },
                                "required": [
                                  "code",
                                  "name"
                                ]
                              },
                              "description": "Every place of performance on the notice."
                            },
                            "noticeType": {
                              "type": "string",
                              "description": "The kind of notice, as its eForms document type: `PriorInformationNotice`, `ContractNotice` or `ContractAwardNotice`. See the eForms documentation at https://docs.ted.europa.eu/eforms/latest/."
                            },
                            "publicationNumber": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The notice's number where it was published, such as a TED publication number. Null when it has none."
                            },
                            "frameworkMaxValue": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "For a framework agreement, the most it may be worth over its term, in `currency`. Null when the notice states none."
                            },
                            "awardOutcome": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "awardDate": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "description": "The day the buyer decided the award, the earliest where the notice records several contracts, given as 00:00 UTC on that day. Null when the notice gives no date."
                                },
                                "bidCount": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "description": "Tenders received, summed across the lots. Null when the notice does not report it."
                                },
                                "awardedValue": {
                                  "type": [
                                    "number",
                                    "null"
                                  ],
                                  "description": "Total value of the contracts awarded, in Swedish kronor. Null when the notice does not state it in kronor."
                                },
                                "currency": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "SEK when awardedValue is set, otherwise null."
                                },
                                "lotCount": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "description": "How many lots the notice lists. A procurement that is not divided into lots is listed as one."
                                },
                                "lotsAwarded": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "description": "Lots on which the buyer chose a winner. Null when the notice does not state the result of any lot."
                                },
                                "lotsNotAwarded": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "description": "Lots the buyer closed without choosing a winner, for example because no tenders arrived or all were rejected. Null when the notice does not state the result of any lot."
                                },
                                "lotsUndecided": {
                                  "type": [
                                    "integer",
                                    "null"
                                  ],
                                  "minimum": 0,
                                  "description": "Lots on which no winner has been chosen yet and the competition is still running. Null when the notice does not state the result of any lot. The three lot counts can sum to less than lotCount: a lot whose result the notice does not state is in none of them."
                                }
                              },
                              "required": [
                                "awardDate",
                                "bidCount",
                                "awardedValue",
                                "currency",
                                "lotCount",
                                "lotsAwarded",
                                "lotsNotAwarded",
                                "lotsUndecided"
                              ],
                              "description": "Counts and totals from this notice's result. Null while the notice is open, and on a notice that carries no result."
                            },
                            "related": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid",
                                    "description": "The notice's id."
                                  },
                                  "slug": {
                                    "type": "string",
                                    "description": "The last segment of the notice's page on fentlig.se."
                                  },
                                  "title": {
                                    "type": "string",
                                    "description": "The notice's title."
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "planned",
                                      "open",
                                      "closed",
                                      "concluded"
                                    ],
                                    "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                                  },
                                  "publicationDate": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the notice was published, as an RFC 3339 timestamp in UTC. A source that gives only the day is stored at 00:00 UTC on that day, so read the date part as the calendar day."
                                  }
                                },
                                "required": [
                                  "id",
                                  "slug",
                                  "title",
                                  "status",
                                  "publicationDate"
                                ]
                              },
                              "description": "Other notices from the same buyer that are no longer open."
                            },
                            "depthWithheld": {
                              "type": "boolean",
                              "description": "True while the notice is open. `awardOutcome` and the result fields are then left empty, and fill in once it is no longer open."
                            },
                            "resultPublishedElsewhere": {
                              "type": "boolean",
                              "description": "True when a result notice exists for this procurement and it is not this notice. It says a result was published, not that a contract was awarded: see that notice's own `awardOutcome`. It can be true while `resultNotices` is empty, when the result notice is not one this API publishes."
                            },
                            "resultNoticeCount": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "How many result notices for this procurement this API publishes. `resultNotices` may hold fewer."
                            },
                            "resultNotices": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "format": "uuid",
                                    "description": "The notice's id."
                                  },
                                  "slug": {
                                    "type": "string",
                                    "description": "The last segment of the notice's page on fentlig.se."
                                  },
                                  "title": {
                                    "type": "string",
                                    "description": "The notice's title."
                                  },
                                  "status": {
                                    "type": "string",
                                    "enum": [
                                      "planned",
                                      "open",
                                      "closed",
                                      "concluded"
                                    ],
                                    "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                                  },
                                  "publicationDate": {
                                    "type": "string",
                                    "format": "date-time",
                                    "description": "When the notice was published, as an RFC 3339 timestamp in UTC. A source that gives only the day is stored at 00:00 UTC on that day, so read the date part as the calendar day."
                                  }
                                },
                                "required": [
                                  "id",
                                  "slug",
                                  "title",
                                  "status",
                                  "publicationDate"
                                ]
                              },
                              "description": "The procurement's result notices, newest first, cut short when there are many; compare with `resultNoticeCount`. A framework awarded lot by lot, or awarded again, has several."
                            },
                            "listedNotice": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "format": "uuid",
                                  "description": "The listed notice's id."
                                },
                                "slug": {
                                  "type": "string",
                                  "description": "The last segment of the listed notice's page on fentlig.se."
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "planned",
                                    "open",
                                    "closed",
                                    "concluded"
                                  ],
                                  "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                                },
                                "deadlineDate": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "format": "date-time",
                                  "description": "When tenders must be in, as an RFC 3339 timestamp in UTC carrying the time of day the notice states. Null when the notice states no deadline."
                                }
                              },
                              "required": [
                                "id",
                                "slug",
                                "status",
                                "deadlineDate"
                              ],
                              "description": "The notice this procurement is listed under, when it is not this one. Listings show each procurement once, under one of its notices; every notice keeps its own page. Null when this notice is the one listed."
                            }
                          },
                          "required": [
                            "id",
                            "slug",
                            "title",
                            "buyerName",
                            "buyerId",
                            "buyerUnit",
                            "status",
                            "publicationDate",
                            "deadlineDate",
                            "regionCodes",
                            "mainCpv",
                            "procedureCode",
                            "estimatedValue",
                            "currency",
                            "source",
                            "sourceUrl",
                            "description",
                            "cpvCodes",
                            "regions",
                            "noticeType",
                            "publicationNumber",
                            "frameworkMaxValue",
                            "awardOutcome",
                            "related",
                            "depthWithheld",
                            "resultPublishedElsewhere",
                            "resultNoticeCount",
                            "resultNotices",
                            "listedNotice"
                          ]
                        },
                        "coverage": {
                          "type": "object",
                          "properties": {
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "Where the data in this answer was published, such as `TED`, `Upphandlingsmyndigheten`, or `Fentlig` for notices Fentlig compiled from the platforms where buyers advertise."
                            },
                            "attribution": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "source": {
                                    "type": "string",
                                    "description": "The source this line credits, as it is named in `sources`."
                                  },
                                  "text": {
                                    "type": "string",
                                    "description": "The credit line, to be reproduced word for word wherever the data is republished."
                                  }
                                },
                                "required": [
                                  "source",
                                  "text"
                                ]
                              },
                              "description": "One credit line for each source in `sources` whose terms ask for one."
                            },
                            "dataAsOf": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time",
                              "description": "When the most recently published record in the covered set was published, as an RFC 3339 timestamp in UTC. Null when the set is empty."
                            },
                            "isComplete": {
                              "type": "boolean",
                              "enum": [
                                false
                              ],
                              "description": "Always false: this is part of the market, not all of it. A procurement missing from an answer may still exist."
                            },
                            "note": {
                              "type": "string",
                              "description": "What the data covers, in a sentence or two."
                            }
                          },
                          "required": [
                            "sources",
                            "attribution",
                            "dataAsOf",
                            "isComplete",
                            "note"
                          ],
                          "description": "What the answer is drawn from, how current it is, and the credit to reproduce when republishing it."
                        }
                      },
                      "required": [
                        "data",
                        "coverage"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A parameter could not be read, the search cannot run as written, or the page is past the limit: `(page - 1) x limit` must be below 1000. `detail` says which.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API key sent is unknown, revoked or expired. Send a valid key, or none on an operation that needs none.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "No API key was sent, or the key's scopes or its workspace's plan do not cover this query. `detail` says which, and names the scope when one is missing.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No published notice has the slug in `?slug=`",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests in the current window, from this key or, without a key, from this address. Wait the number of seconds in `Retry-After`, then send the request again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before sending the request again.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the current window ends, as a Unix timestamp in seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/v1/notices/{id}": {
      "get": {
        "operationId": "getNotice",
        "tags": [
          "Notices"
        ],
        "summary": "One published notice",
        "description": "Returns one published notice by its id, which never changes. Every notice of a procurement answers here, including those the listing shows under another notice; `listedNotice` names that one. To start from the slug in a notice's address on fentlig.se, use `GET /v1/notices?slug=`, which answers with this same body. No API key is needed; every published notice is also a page on fentlig.se, listed in https://fentlig.se/sitemap.xml.",
        "security": [
          {
            "apiKey": []
          },
          {}
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "The notice's id, a UUID: `id` in any notice answer.",
              "example": "3f1c9a2e-8b7d-4c5e-9f0a-1b2c3d4e5f60"
            },
            "required": true,
            "description": "The notice's id, a UUID: `id` in any notice answer.",
            "name": "id",
            "in": "path"
          },
          {
            "schema": {
              "type": "string",
              "description": "Which markets, by the buyer's country: ISO 3166-1 alpha-2 codes separated by commas, or `all`. Defaults to `SE`. A caller without a key carrying `notices:search` always reads `SE`.",
              "example": "SE,FI"
            },
            "required": false,
            "description": "Which markets, by the buyer's country: ISO 3166-1 alpha-2 codes separated by commas, or `all`. Defaults to `SE`. A caller without a key carrying `notices:search` always reads `SE`.",
            "name": "country",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "exclude",
                "include"
              ],
              "description": "`include` adds the notices whose buyer is outside the named countries and whose work is performed in one of them. Defaults to `exclude`.",
              "example": "include"
            },
            "required": false,
            "description": "`include` adds the notices whose buyer is outside the named countries and whose work is performed in one of them. Defaults to `exclude`.",
            "name": "foreign_buyers",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The notice",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the current window ends, as a Unix timestamp in seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "description": "The notice's id. It never changes, and `GET /v1/notices/{id}` answers with it."
                        },
                        "slug": {
                          "type": "string",
                          "description": "The last segment of the notice's page on fentlig.se, `https://fentlig.se/upphandling/{slug}`. It follows the title, so it changes when a correction rewords the title; the id does not."
                        },
                        "title": {
                          "type": "string",
                          "description": "The notice's title, as the buyer wrote it."
                        },
                        "buyerName": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The buyer's name, as the notice gives it. Null when the notice names no buyer."
                        },
                        "buyerId": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid",
                          "description": "The buyer as an organization, for the `buyer_id` filter. Several spellings of one buyer's name share this id. Null when the buyer could not be matched to an organization."
                        },
                        "buyerUnit": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "name": {
                              "type": "string",
                              "description": "The name of the unit that ran the procurement: a department of the buyer, or a joint procurement centre."
                            },
                            "kind": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "enum": [
                                "joint_centre",
                                null
                              ],
                              "description": "`joint_centre` when the unit is a joint procurement centre that tenders on behalf of several organizations; null for a department of the buyer."
                            },
                            "id": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The joint procurement centre's stable identifier, or null for a department."
                            }
                          },
                          "required": [
                            "name",
                            "kind",
                            "id"
                          ],
                          "description": "The unit that ran the procurement, when the notice names one: a department of the buyer, or a joint procurement centre tendering for several organizations. Null when the notice names the buyer itself."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "planned",
                            "open",
                            "closed",
                            "concluded"
                          ],
                          "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                        },
                        "publicationDate": {
                          "type": "string",
                          "format": "date-time",
                          "description": "When the notice was published, as an RFC 3339 timestamp in UTC. A source that gives only the day is stored at 00:00 UTC on that day, so read the date part as the calendar day."
                        },
                        "deadlineDate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When tenders must be in, as an RFC 3339 timestamp in UTC carrying the time of day the notice states. Null when the notice states no deadline."
                        },
                        "regionCodes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Where the work is performed, as NUTS codes. `anyw` is anywhere, `anyw-eea` anywhere in the EEA."
                        },
                        "mainCpv": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "code": {
                              "type": "string",
                              "description": "The CPV code: eight digits, without the check digit."
                            },
                            "label": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "The code's name in Swedish. Null for a code the CPV vocabulary does not name."
                            },
                            "isMain": {
                              "type": "boolean",
                              "description": "True for the code the notice gives as its main one."
                            }
                          },
                          "required": [
                            "code",
                            "label",
                            "isMain"
                          ],
                          "description": "The notice's main CPV code. Null when it gives none."
                        },
                        "procedureCode": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The procedure, as a code from the EU procurement procedure type list (http://publications.europa.eu/resource/authority/procurement-procedure-type) with hyphens written as underscores, such as `open`, `restricted` or `neg_w_call`. Swedish procedures that list has no code for are `direct` (direct award), `simplified` and `selective`, and `other` is a procedure the notice names without a code. Null when the notice gives none."
                        },
                        "estimatedValue": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "The value the buyer estimated, in `currency`. Null when the notice states none."
                        },
                        "currency": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The ISO 4217 code of the currency `estimatedValue` and `frameworkMaxValue` are stated in, such as `SEK` or `EUR`. Null when the notice states no value."
                        },
                        "source": {
                          "type": "string",
                          "description": "Where the notice came from: `TED`, or `Fentlig` for a notice Fentlig compiled from the platforms where buyers advertise. `sourceUrl` links the original."
                        },
                        "sourceUrl": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The notice at the place it was published. Null when there is no address to link to."
                        },
                        "description": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The notice's description, as the buyer wrote it, with email addresses and phone numbers removed. Null when the notice has none."
                        },
                        "cpvCodes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "The CPV code: eight digits, without the check digit."
                              },
                              "label": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The code's name in Swedish. Null for a code the CPV vocabulary does not name."
                              },
                              "isMain": {
                                "type": "boolean",
                                "description": "True for the code the notice gives as its main one."
                              }
                            },
                            "required": [
                              "code",
                              "label",
                              "isMain"
                            ]
                          },
                          "description": "Every CPV code on the notice, the main one first."
                        },
                        "regions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "A NUTS code, or `anyw` or `anyw-eea`."
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The place's name in Swedish, such as `Hela Sverige` for work performed anywhere in Sweden or `Var som helst` for `anyw`. Null for a code without one."
                              }
                            },
                            "required": [
                              "code",
                              "name"
                            ]
                          },
                          "description": "Every place of performance on the notice."
                        },
                        "noticeType": {
                          "type": "string",
                          "description": "The kind of notice, as its eForms document type: `PriorInformationNotice`, `ContractNotice` or `ContractAwardNotice`. See the eForms documentation at https://docs.ted.europa.eu/eforms/latest/."
                        },
                        "publicationNumber": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The notice's number where it was published, such as a TED publication number. Null when it has none."
                        },
                        "frameworkMaxValue": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "description": "For a framework agreement, the most it may be worth over its term, in `currency`. Null when the notice states none."
                        },
                        "awardOutcome": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "awardDate": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time",
                              "description": "The day the buyer decided the award, the earliest where the notice records several contracts, given as 00:00 UTC on that day. Null when the notice gives no date."
                            },
                            "bidCount": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 0,
                              "description": "Tenders received, summed across the lots. Null when the notice does not report it."
                            },
                            "awardedValue": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Total value of the contracts awarded, in Swedish kronor. Null when the notice does not state it in kronor."
                            },
                            "currency": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "description": "SEK when awardedValue is set, otherwise null."
                            },
                            "lotCount": {
                              "type": "integer",
                              "minimum": 0,
                              "description": "How many lots the notice lists. A procurement that is not divided into lots is listed as one."
                            },
                            "lotsAwarded": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 0,
                              "description": "Lots on which the buyer chose a winner. Null when the notice does not state the result of any lot."
                            },
                            "lotsNotAwarded": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 0,
                              "description": "Lots the buyer closed without choosing a winner, for example because no tenders arrived or all were rejected. Null when the notice does not state the result of any lot."
                            },
                            "lotsUndecided": {
                              "type": [
                                "integer",
                                "null"
                              ],
                              "minimum": 0,
                              "description": "Lots on which no winner has been chosen yet and the competition is still running. Null when the notice does not state the result of any lot. The three lot counts can sum to less than lotCount: a lot whose result the notice does not state is in none of them."
                            }
                          },
                          "required": [
                            "awardDate",
                            "bidCount",
                            "awardedValue",
                            "currency",
                            "lotCount",
                            "lotsAwarded",
                            "lotsNotAwarded",
                            "lotsUndecided"
                          ],
                          "description": "Counts and totals from this notice's result. Null while the notice is open, and on a notice that carries no result."
                        },
                        "related": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The notice's id."
                              },
                              "slug": {
                                "type": "string",
                                "description": "The last segment of the notice's page on fentlig.se."
                              },
                              "title": {
                                "type": "string",
                                "description": "The notice's title."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "planned",
                                  "open",
                                  "closed",
                                  "concluded"
                                ],
                                "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                              },
                              "publicationDate": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the notice was published, as an RFC 3339 timestamp in UTC. A source that gives only the day is stored at 00:00 UTC on that day, so read the date part as the calendar day."
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "title",
                              "status",
                              "publicationDate"
                            ]
                          },
                          "description": "Other notices from the same buyer that are no longer open."
                        },
                        "depthWithheld": {
                          "type": "boolean",
                          "description": "True while the notice is open. `awardOutcome` and the result fields are then left empty, and fill in once it is no longer open."
                        },
                        "resultPublishedElsewhere": {
                          "type": "boolean",
                          "description": "True when a result notice exists for this procurement and it is not this notice. It says a result was published, not that a contract was awarded: see that notice's own `awardOutcome`. It can be true while `resultNotices` is empty, when the result notice is not one this API publishes."
                        },
                        "resultNoticeCount": {
                          "type": "integer",
                          "minimum": 0,
                          "description": "How many result notices for this procurement this API publishes. `resultNotices` may hold fewer."
                        },
                        "resultNotices": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "format": "uuid",
                                "description": "The notice's id."
                              },
                              "slug": {
                                "type": "string",
                                "description": "The last segment of the notice's page on fentlig.se."
                              },
                              "title": {
                                "type": "string",
                                "description": "The notice's title."
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "planned",
                                  "open",
                                  "closed",
                                  "concluded"
                                ],
                                "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                              },
                              "publicationDate": {
                                "type": "string",
                                "format": "date-time",
                                "description": "When the notice was published, as an RFC 3339 timestamp in UTC. A source that gives only the day is stored at 00:00 UTC on that day, so read the date part as the calendar day."
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "title",
                              "status",
                              "publicationDate"
                            ]
                          },
                          "description": "The procurement's result notices, newest first, cut short when there are many; compare with `resultNoticeCount`. A framework awarded lot by lot, or awarded again, has several."
                        },
                        "listedNotice": {
                          "type": [
                            "object",
                            "null"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid",
                              "description": "The listed notice's id."
                            },
                            "slug": {
                              "type": "string",
                              "description": "The last segment of the listed notice's page on fentlig.se."
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "planned",
                                "open",
                                "closed",
                                "concluded"
                              ],
                              "description": "The procurement's position: `planned` has only a prior information notice and cannot be bid on; `open` is accepting tenders until its deadline; `closed` has passed its deadline with no result notice published; `concluded` has a result notice, which records an award or a discontinued procedure."
                            },
                            "deadlineDate": {
                              "type": [
                                "string",
                                "null"
                              ],
                              "format": "date-time",
                              "description": "When tenders must be in, as an RFC 3339 timestamp in UTC carrying the time of day the notice states. Null when the notice states no deadline."
                            }
                          },
                          "required": [
                            "id",
                            "slug",
                            "status",
                            "deadlineDate"
                          ],
                          "description": "The notice this procurement is listed under, when it is not this one. Listings show each procurement once, under one of its notices; every notice keeps its own page. Null when this notice is the one listed."
                        }
                      },
                      "required": [
                        "id",
                        "slug",
                        "title",
                        "buyerName",
                        "buyerId",
                        "buyerUnit",
                        "status",
                        "publicationDate",
                        "deadlineDate",
                        "regionCodes",
                        "mainCpv",
                        "procedureCode",
                        "estimatedValue",
                        "currency",
                        "source",
                        "sourceUrl",
                        "description",
                        "cpvCodes",
                        "regions",
                        "noticeType",
                        "publicationNumber",
                        "frameworkMaxValue",
                        "awardOutcome",
                        "related",
                        "depthWithheld",
                        "resultPublishedElsewhere",
                        "resultNoticeCount",
                        "resultNotices",
                        "listedNotice"
                      ]
                    },
                    "coverage": {
                      "type": "object",
                      "properties": {
                        "sources": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Where the data in this answer was published, such as `TED`, `Upphandlingsmyndigheten`, or `Fentlig` for notices Fentlig compiled from the platforms where buyers advertise."
                        },
                        "attribution": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "source": {
                                "type": "string",
                                "description": "The source this line credits, as it is named in `sources`."
                              },
                              "text": {
                                "type": "string",
                                "description": "The credit line, to be reproduced word for word wherever the data is republished."
                              }
                            },
                            "required": [
                              "source",
                              "text"
                            ]
                          },
                          "description": "One credit line for each source in `sources` whose terms ask for one."
                        },
                        "dataAsOf": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date-time",
                          "description": "When the most recently published record in the covered set was published, as an RFC 3339 timestamp in UTC. Null when the set is empty."
                        },
                        "isComplete": {
                          "type": "boolean",
                          "enum": [
                            false
                          ],
                          "description": "Always false: this is part of the market, not all of it. A procurement missing from an answer may still exist."
                        },
                        "note": {
                          "type": "string",
                          "description": "What the data covers, in a sentence or two."
                        }
                      },
                      "required": [
                        "sources",
                        "attribution",
                        "dataAsOf",
                        "isComplete",
                        "note"
                      ],
                      "description": "What the answer is drawn from, how current it is, and the credit to reproduce when republishing it."
                    }
                  },
                  "required": [
                    "data",
                    "coverage"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The path segment is not a notice id",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API key sent is unknown, revoked or expired. Send a valid key, or none on an operation that needs none.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The API key sent belongs to a workspace whose subscription has ended. The same request without a key answers.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No published notice has this id in the markets the request covers",
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many requests in the current window, from this key or, without a key, from this address. Wait the number of seconds in `Retry-After`, then send the request again.",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before sending the request again.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Requests allowed in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "X-RateLimit-Reset": {
                "description": "When the current window ends, as a Unix timestamp in seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "integer"
                    },
                    "detail": {
                      "type": "string"
                    },
                    "instance": {
                      "type": "string"
                    },
                    "code": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "type",
                    "title",
                    "status",
                    "code"
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}
