# Doffin — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search for public procurement tenders across Norway and retrieve detailed information about bidding opportunities, including tender specifics, CPV category codes, and location data. Stay informed about government contracts and procurement notices from the official Norwegian national database.

**Category:** Government & Public Data | **Website:** [doffin.no/](https://doffin.no/) | **Docs:** [parse.bot/marketplace/275f0b38-0594-4fcd-9f89-480b3e2abe8e/doffin-no-api](https://parse.bot/marketplace/275f0b38-0594-4fcd-9f89-480b3e2abe8e/doffin-no-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/doffin/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get cpv codes

Get the hierarchical list of CPV (Common Procurement Vocabulary) codes used to classify procurement categories. Returns a tree structure with nested children.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/doffin/get-cpv-codes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get location codes

Get the hierarchical tree of Norwegian location and region codes used for filtering tenders by geography.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/doffin/get-location-codes \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get tender detail

Get full details of a single procurement notice by its ID. Returns comprehensive information including buyer details, eForm structured sections, CPV codes, timeline, and award information.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `notice_id` | string | Yes | The reference ID of the notice (e.g. '2025-116485'). Obtainable from search_tenders results. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/doffin/get-tender-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"notice_id":"<string>"}'
```

### Search tenders

Search for procurement notices (tenders) with various filters. Returns paginated results with facets for filtering.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `contract_natures` | string | No | Comma-separated contract nature filter values. |
| `cpv_ids` | string | No | Comma-separated CPV code IDs to filter by (e.g. '72000000,45000000'). |
| `limit` | integer | No | Number of results per page. |
| `locations` | string | No | Comma-separated location IDs to filter by (e.g. 'NO08,NO0A'). Use get_location_codes to discover valid IDs. |
| `page` | integer | No | Page number for pagination. |
| `pub_from` | string | No | Publication date lower bound in ISO 8601 format (e.g. '2023-01-01T00:00:00.000Z'). |
| `pub_to` | string | No | Publication date upper bound in ISO 8601 format (e.g. '2026-01-01T00:00:00.000Z'). |
| `query` | string | No | Search keyword to match against tender titles and descriptions. |
| `sort_by` | string | No | Sort order for results. |
| `statuses` | string | No | Comma-separated status filter values. |
| `types` | string | No | Comma-separated notice type filter values. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/doffin/search-tenders \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"contract_natures":"<string>","cpv_ids":"<string>","limit":"<integer>","locations":"<string>","page":"<integer>","pub_from":"<string>","pub_to":"<string>","query":"<string>","sort_by":"<string>","statuses":"<string>","types":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.