# GET /v1/notices

List procurements, or look up one notice by slug

Needs an API key, except with ?slug=. See https://fentlig.se/utvecklare/authentication.

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.

## Request

```bash
curl "https://api.fentlig.se/v1/notices" \
  -H "Authorization: Bearer $FENTLIG_API_KEY"
```

## Parameters

| Parameter | In | Type | Required | Notes |
| --- | --- | --- | --- | --- |
| `page` | query | integer | no | min 1 · default 1 |
| `limit` | query | integer | no | 1–50 · default 20 |
| `country` | query | string | no |  |
| `foreign_buyers` | query | enum | no | `exclude`, `include` |
| `status` | query | string[] | no |  |
| `region` | query | string[] | no |  |
| `nationwide` | query | enum | no | `include`, `exclude` |
| `cpv` | query | string[] | no |  |
| `buyer` | query | string[] | no |  |
| `buyer_id` | query | string[] | no |  |
| `search` | query | string | no |  |
| `document_search` | query | string | no |  |
| `deadline_after` | query | string | no | date-time |
| `deadline_before` | query | string | no | date-time |
| `publication_after` | query | string | no | date-time |
| `publication_before` | query | string | no | date-time |
| `min_value` | query | number | no |  |
| `max_value` | query | number | no |  |
| `exclude_past_deadline` | query | boolean | no |  |
| `closed_without_award` | query | boolean | no |  |
| `sort` | query | enum | no | `publication_desc`, `deadline_asc`, `value_desc` |
| `evaluation_method` | query | string[] | no |  |
| `quality_weight_min` | query | integer | no | 0–100 |
| `contract_months_min` | query | integer | no | min 0 |
| `contract_months_max` | query | integer | no | min 0 |
| `slug` | query | string | no |  |

## Response 200

A page of procurements; or, with `?slug=`, the one notice it names

### A page of results

| Field | Type | Notes |
| --- | --- | --- |
| `data` | object[] |  |
| `data[].id` | string | uuid |
| `data[].slug` | string |  |
| `data[].title` | string |  |
| `data[].buyerName` | string | nullable |
| `data[].buyerId` | string | nullable · uuid |
| `data[].buyerUnit` | object | nullable |
| `data[].buyerUnit.name` | string |  |
| `data[].buyerUnit.kind` | enum | nullable · `joint_centre`, `null` |
| `data[].buyerUnit.id` | string | nullable |
| `data[].status` | enum | `planned`, `open`, `closed`, `concluded` |
| `data[].publicationDate` | string | date-time |
| `data[].deadlineDate` | string | nullable · date-time |
| `data[].regionCodes` | string[] |  |
| `data[].mainCpv` | object | nullable |
| `data[].mainCpv.code` | string |  |
| `data[].mainCpv.label` | string | nullable |
| `data[].mainCpv.isMain` | boolean |  |
| `data[].procedureCode` | string | nullable |
| `data[].estimatedValue` | number | nullable |
| `data[].currency` | string | nullable |
| `data[].source` | string |  |
| `data[].sourceUrl` | string | nullable |
| `data[].documentMatch` | object | nullable |
| `data[].documentMatch.documentId` | string | uuid |
| `data[].documentMatch.snippet` | string | nullable |
| `data[].documentMatch.tooLongToQuote` | boolean |  |
| `pagination` | object |  |
| `pagination.page` | number |  |
| `pagination.limit` | number |  |
| `pagination.total` | number |  |
| `pagination.totalPages` | number |  |
| `pagination.hasNextPage` | boolean |  |
| `pagination.hasPreviousPage` | boolean |  |
| `documentSearch` | object | nullable |
| `documentSearch.withDocuments` | integer | min 0 |
| `documentSearch.inScope` | integer | min 0 |
| `coverage` | object |  |
| `coverage.sources` | string[] |  |
| `coverage.attribution` | object[] |  |
| `coverage.attribution[].source` | string |  |
| `coverage.attribution[].text` | string |  |
| `coverage.dataAsOf` | string | nullable · date-time |
| `coverage.isComplete` | enum | `false` |
| `coverage.note` | string |  |

### A single object

| Field | Type | Notes |
| --- | --- | --- |
| `data` | object |  |
| `data.id` | string | uuid |
| `data.slug` | string |  |
| `data.title` | string |  |
| `data.buyerName` | string | nullable |
| `data.buyerId` | string | nullable · uuid |
| `data.buyerUnit` | object | nullable |
| `data.buyerUnit.name` | string |  |
| `data.buyerUnit.kind` | enum | nullable · `joint_centre`, `null` |
| `data.buyerUnit.id` | string | nullable |
| `data.status` | enum | `planned`, `open`, `closed`, `concluded` |
| `data.publicationDate` | string | date-time |
| `data.deadlineDate` | string | nullable · date-time |
| `data.regionCodes` | string[] |  |
| `data.mainCpv` | object | nullable |
| `data.mainCpv.code` | string |  |
| `data.mainCpv.label` | string | nullable |
| `data.mainCpv.isMain` | boolean |  |
| `data.procedureCode` | string | nullable |
| `data.estimatedValue` | number | nullable |
| `data.currency` | string | nullable |
| `data.source` | string |  |
| `data.sourceUrl` | string | nullable |
| `data.description` | string | nullable |
| `data.cpvCodes` | object[] |  |
| `data.cpvCodes[].code` | string |  |
| `data.cpvCodes[].label` | string | nullable |
| `data.cpvCodes[].isMain` | boolean |  |
| `data.regions` | object[] |  |
| `data.regions[].code` | string |  |
| `data.regions[].name` | string | nullable |
| `data.noticeType` | string |  |
| `data.publicationNumber` | string | nullable |
| `data.frameworkMaxValue` | number | nullable |
| `data.awardOutcome` | object | nullable |
| `data.awardOutcome.awardDate` | string | nullable · date-time |
| `data.awardOutcome.bidCount` | integer | nullable · min 0 |
| `data.awardOutcome.awardedValue` | number | nullable |
| `data.awardOutcome.currency` | string | nullable |
| `data.awardOutcome.lotCount` | integer | min 0 |
| `data.awardOutcome.lotsAwarded` | integer | nullable · min 0 |
| `data.awardOutcome.lotsNotAwarded` | integer | nullable · min 0 |
| `data.awardOutcome.lotsUndecided` | integer | nullable · min 0 |
| `data.related` | object[] |  |
| `data.related[].id` | string | uuid |
| `data.related[].slug` | string |  |
| `data.related[].title` | string |  |
| `data.related[].status` | enum | `planned`, `open`, `closed`, `concluded` |
| `data.related[].publicationDate` | string | date-time |
| `data.depthWithheld` | boolean |  |
| `data.resultPublishedElsewhere` | boolean |  |
| `data.resultNoticeCount` | integer | min 0 |
| `data.resultNotices` | object[] |  |
| `data.resultNotices[].id` | string | uuid |
| `data.resultNotices[].slug` | string |  |
| `data.resultNotices[].title` | string |  |
| `data.resultNotices[].status` | enum | `planned`, `open`, `closed`, `concluded` |
| `data.resultNotices[].publicationDate` | string | date-time |
| `data.listedNotice` | object | nullable |
| `data.listedNotice.id` | string | uuid |
| `data.listedNotice.slug` | string |  |
| `data.listedNotice.status` | enum | `planned`, `open`, `closed`, `concluded` |
| `data.listedNotice.deadlineDate` | string | nullable · date-time |
| `coverage` | object |  |
| `coverage.sources` | string[] |  |
| `coverage.attribution` | object[] |  |
| `coverage.attribution[].source` | string |  |
| `coverage.attribution[].text` | string |  |
| `coverage.dataAsOf` | string | nullable · date-time |
| `coverage.isComplete` | enum | `false` |
| `coverage.note` | string |  |

## Failures

| Status | Meaning |
| --- | --- |
| 400 | 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. |
| 401 | The API key sent is unknown, revoked or expired. Send a valid key, or none on an operation that needs none. |
| 403 | 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. |
| 404 | No published notice has the slug in `?slug=` |
| 429 | 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. |

Every failure is an RFC 9457 problem document. See https://fentlig.se/utvecklare/fel.

Base URL: https://api.fentlig.se
