API for buyers

A read-only API for buyers connected on SoilPass. It returns only the deliveries your linked suppliers made to you and, for each one, the TRACES GeoJSON you can pass to your own satellite provider.

Getting a key

In SoilPass go to Settings, Linked supply chain, API access (buyer company manager only). The key is shown once, when you create it. You can have at most 5 active keys and revoke one at any time. Send the key in the header of every request:

Authorization: Bearer sp_live_<your key>

Limits

600 requests per hour per key. Beyond that the response is 429 with a Retry-After header (seconds to wait).

Endpoints

GET /api/v1/suppliers

Suppliers linked to your company.

No parameters.

Example response

{
  "data": [
    {
      "linkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e",
      "name": "Segheria Alpina S.r.l.",
      "vatNumber": "IT01234567890",
      "since": "2026-08-01T10:00:00+00:00"
    }
  ]
}

GET /api/v1/deliveries

Deliveries you received, ordered by changedAt ascending, in pages.

Parameters

updated_since
full ISO 8601 date-time with time zone (e.g. 2026-10-01T08:30:00.123456+00:00): only deliveries changed after it.
supplier
supplier link id (linkId): only deliveries from that supplier.
cursor
the nextCursor of the previous page.
limit
1 to 200, default 50.

Example response

{
  "data": [
    {
      "id": "3f2b6c1e-8a4d-4e0b-9c57-1d2e3f4a5b6c",
      "supplierLinkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e",
      "supplierName": "Segheria Alpina S.r.l.",
      "supplierVat": "IT01234567890",
      "lotLabel": "Lotto 2026-14",
      "lotHsCode": "4407",
      "speciesScientificName": "Picea abies",
      "date": "2026-09-30",
      "netMassKg": 18250,
      "volumeM3": 36.5,
      "documentRef": "DDT 412/2026",
      "changedAt": "2026-10-01T08:30:00.123456+00:00",
      "latestDds": {
        "id": "9a7d5e3c-2b1f-4c68-8e90-a1b2c3d4e5f6",
        "createdAt": "2026-10-01T08:29:12+00:00",
        "branch": "simplified",
        "reference": "26ITABCD1234567",
        "verification": "XYZ123",
        "anchorId": "b7c6a5f4-3e2d-4a1b-9c8d-7e6f5a4b3c2d",
        "anchorStatus": "anchored",
        "verifyUrlPath": "/verify/b7c6a5f4-3e2d-4a1b-9c8d-7e6f5a4b3c2d"
      }
    }
  ],
  "nextCursor": "eyJjIjoiMjAyNi0xMC0wMVQwODozMDowMC4xMjM0NTYrMDA6MDAiLCJpIjoiM2YyYjZjMWUtOGE0ZC00ZTBiLTljNTctMWQyZTNmNGE1YjZjIn0"
}

GET /api/v1/deliveries/{id}

One delivery. If it is not yours or does not exist: 404.

Parameters

id
delivery id.

Example response

{
  "data": {
    "id": "3f2b6c1e-8a4d-4e0b-9c57-1d2e3f4a5b6c",
    "supplierLinkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e",
    "supplierName": "Segheria Alpina S.r.l.",
    "supplierVat": "IT01234567890",
    "lotLabel": "Lotto 2026-14",
    "lotHsCode": "4407",
    "speciesScientificName": "Picea abies",
    "date": "2026-09-30",
    "netMassKg": 18250,
    "volumeM3": 36.5,
    "documentRef": "DDT 412/2026",
    "changedAt": "2026-10-01T08:30:00.123456+00:00",
    "latestDds": {
      "id": "9a7d5e3c-2b1f-4c68-8e90-a1b2c3d4e5f6",
      "createdAt": "2026-10-01T08:29:12+00:00",
      "branch": "simplified",
      "reference": "26ITABCD1234567",
      "verification": "XYZ123",
      "anchorId": "b7c6a5f4-3e2d-4a1b-9c8d-7e6f5a4b3c2d",
      "anchorStatus": "anchored",
      "verifyUrlPath": "/verify/b7c6a5f4-3e2d-4a1b-9c8d-7e6f5a4b3c2d"
    }
  }
}

verifyUrlPath is a relative path: prefix it with https://soilpass.io to get the public verification page.

GET /api/v1/dds/{id}/geojson

TRACES GeoJSON of the due diligence statement (DDS) of a delivery, as a downloadable file (application/geo+json). The id is the one in latestDds.id.

Parameters

id
DDS id (latestDds.id).

Example response

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": { "ProducerName": "Segheria Alpina S.r.l.", "Area": 6.4 },
      "geometry": {
        "type": "Polygon",
        "coordinates": [[[11.12, 46.07], [11.13, 46.07], [11.13, 46.08], [11.12, 46.08], [11.12, 46.07]]]
      }
    }
  ]
}

Staying in sync

Call /api/v1/deliveries with updated_since. While nextCursor is not null, repeat passing cursor, until nextCursor is null. Store the changedAt of the last delivery you received and pass it back unchanged as updated_since next time (do not round it: keep the microseconds). Changes appear after about 30 seconds.

A delivery that is no longer visible (supplier unlinked or delivery deleted) disappears from the list without any signal. To check whether it still exists, re-read it by id: a 404 means it is no longer available.

Webhooks

Webhooks notify you right away, so you do not have to poll the API. Events are "thin": they carry only ids, never names, quantities or VAT numbers. When one arrives, read the details with your API key (GET /api/v1/deliveries/{id}).

To add one go to Settings, Linked supply chain, API access, Webhooks (company manager of the buyer only). The address must be https; you can have at most 3. The secret (whsec_…) is shown only once, at creation: keep it, you need it to verify the signature. The "Send test" button sends a ping event.

Events and request body

Every request is a POST with a JSON body {id, type, createdAt, data}. The content of data depends on the type:

delivery.created: a new delivery (or one moved to a counterparty linked to you).

{
  "id": "0b9e8d7c-6a5f-4e3d-8c2b-1a0f9e8d7c6b",
  "type": "delivery.created",
  "createdAt": "2026-10-01T08:30:00.123Z",
  "data": { "deliveryId": "3f2b6c1e-8a4d-4e0b-9c57-1d2e3f4a5b6c", "supplierLinkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e" }
}

dds.created: a new declaration (DDS) for a delivery.

{
  "id": "0b9e8d7c-6a5f-4e3d-8c2b-1a0f9e8d7c6b",
  "type": "dds.created",
  "createdAt": "2026-10-01T08:30:00.123Z",
  "data": { "ddsId": "9a7d5e3c-2b1f-4c68-8e90-a1b2c3d4e5f6", "deliveryId": "3f2b6c1e-8a4d-4e0b-9c57-1d2e3f4a5b6c", "supplierLinkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e" }
}

dds.reference_set: the DDS reference or verification number was set or changed.

{
  "id": "0b9e8d7c-6a5f-4e3d-8c2b-1a0f9e8d7c6b",
  "type": "dds.reference_set",
  "createdAt": "2026-10-01T08:30:00.123Z",
  "data": { "ddsId": "9a7d5e3c-2b1f-4c68-8e90-a1b2c3d4e5f6", "deliveryId": "3f2b6c1e-8a4d-4e0b-9c57-1d2e3f4a5b6c", "supplierLinkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e" }
}

link.created: a supplier linked to you.

{
  "id": "0b9e8d7c-6a5f-4e3d-8c2b-1a0f9e8d7c6b",
  "type": "link.created",
  "createdAt": "2026-10-01T08:30:00.123Z",
  "data": { "supplierLinkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e" }
}

link.revoked: a link was revoked.

{
  "id": "0b9e8d7c-6a5f-4e3d-8c2b-1a0f9e8d7c6b",
  "type": "link.revoked",
  "createdAt": "2026-10-01T08:30:00.123Z",
  "data": { "supplierLinkId": "5c1e7a90-4b3d-4f26-a8e1-0d9c8b7a6f5e" }
}

ping: the test sent with the "Send test" button.

{
  "id": "0b9e8d7c-6a5f-4e3d-8c2b-1a0f9e8d7c6b",
  "type": "ping",
  "createdAt": "2026-10-01T08:30:00.123Z",
  "data": {}
}

Headers: Content-Type: application/json, SoilPass-Event-Id (same as id), SoilPass-Event-Type (same as type) and SoilPass-Signature.

The signature looks like t=<epoch seconds>,v1=<hex>. v1 is the HMAC-SHA256 of "<t>.<exact body>" keyed with the whole whsec_… secret (prefix included). Compute it over the raw body, before parsing the JSON, and compare with timingSafeEqual. Reject requests where |now − t| is greater than 300 seconds.

Verification example (Node)

import crypto from 'node:crypto';

// rawBody: raw body string, before JSON.parse. secret: the full whsec_... string.
export function verify(rawBody, signatureHeader, secret) {
  const parts = Object.fromEntries(signatureHeader.split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  if (!Number.isFinite(t) || Math.abs(Date.now() / 1000 - t) > 300) return false;
  const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1 ?? '');
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Idempotency: the same event may arrive more than once, use id to discard duplicates. Reply with a 2xx status within 10 seconds: any other answer, or silence, counts as a failure. Redirects are not followed, so give the final address. On failure SoilPass retries for about 3 days, with increasing waits (from 1 minute up to 24 hours). Retries run when SoilPass processes the queue: right after new events and at least once a day. Order of arrival is not guaranteed.

Errors

Errors always have this shape, with English messages:

{ "error": { "code": "unauthorized", "message": "Invalid or revoked API key" } }

curl examples

curl -H "Authorization: Bearer sp_live_<your key>" \
  https://soilpass.io/api/v1/suppliers

curl -H "Authorization: Bearer sp_live_<your key>" \
  "https://soilpass.io/api/v1/deliveries?updated_since=2026-10-01T08:30:00.123456%2B00:00&limit=100"

curl -H "Authorization: Bearer sp_live_<your key>" \
  https://soilpass.io/api/v1/deliveries/3f2b6c1e-8a4d-4e0b-9c57-1d2e3f4a5b6c

curl -H "Authorization: Bearer sp_live_<your key>" \
  -o traces.geojson https://soilpass.io/api/v1/dds/9a7d5e3c-2b1f-4c68-8e90-a1b2c3d4e5f6/geojson