Developers
Build on Bekom.
Read the tender board, what fits your business and the bids you receive, from your own systems. One API, two ways to reach it: REST for scripts and integrations, and a live connection that also pushes what changes.
Quick start
Create a key in your dashboard under Developers, choosing only the scopes your system needs. Then either call REST, or use the official SDK, which keeps one live connection open for calls and pushes alike.
# REST
curl https://api.bekom.io/v1/tenders?closing=open \
-H "Authorization: Bearer $BEKOM_API_KEY"// SDK: npm install @bekom/sdk
import bekom from '@bekom/sdk';
const client = bekom.connect('production', {
apiKey: process.env.BEKOM_API_KEY,
});
const { items } = await client.tenders.list({ closing: 'open' });Environments
| Environment | SDK | Base URL | Keys start with |
|---|---|---|---|
| Production | bekom.connect('production') | https://api.bekom.io | bkm_live_ |
| Testing | bekom.connect('testing') | https://sandbox.bekom.io | bkm_test_ |
A key works only on its own environment. Pointing a testing key at production is refused with a message saying which to use, rather than quietly acting on real tenders.
Keys and scopes
A key acts for one organisation, only within its scopes, and is shown once when it is created: Bekom keeps only a fingerprint of it. Revoking a key stops it on the next request. Everything else follows the same rules as the dashboard: your plan, buyer verification, and bids sealed until the closing time.
| Scope | Lets a key |
|---|---|
tenders:read | Read the tender board: list, search, one tender, its documents and briefings. |
assessments:read | Read what fits your organisation and the verdict on each tender (needs the Qualify plan). |
notices:read | Read your organisation's own published notices and the questions on them. |
notices:write | Draft, update, publish and withdraw notices, and answer questions (publishing needs a verified buyer). |
bids:read | Read bids received on your notices, after each notice closes. |
bids:review | Accept, reject or ask for a new version of a file in a bid you received, and comment on it. |
submissions:write | Prepare your bid on a notice: upload, version, label and remove files. Signing stays with a person. |
notifications:read | Read your organisation's notifications, and receive them live. |
What a key can never do: sign a bid. A system can prepare every file in a bid; a person signs it in the dashboard.
Errors
Every response has success and message. A refusal also carries a code you can act on.
| code | HTTP | What to do |
|---|---|---|
unauthorised | 401 | No key, a revoked key, or a key for the other environment. The message says which. |
scope_required | 403 | The key does not hold a scope this call needs. Create a key with it. |
plan_required | 402 | Your organisation's plan does not include this. The response says which plan does. |
not_on_api | 404 | Not part of the public API. |
rate_limited | 429 | More than 120 requests a minute on one key. Wait for Retry-After. |
Limits
120 requests a minute per key. Each REST response says how many remain in X-RateLimit-Remaining.