Partner API

Conventions

Base URL

All endpoints live under /api/v2/*. Example: https://orobo.io/api/v2/dpps.

Versioning

The major-version is part of the URL path. We break v1 cleanly rather than
shim incompatible behaviour into a single namespace. Within v2 we apply
additive evolution: new
optional fields, new endpoints, new event types and new scopes are non-breaking
and may land at any time. Removing fields, renaming fields, tightening
validation, or changing status codes are breaking changes and only happen on a
v3.

EN 18222 note (18222-08c): the standard requires a version prefix in
the path that gets replaced on later versions, which our /api/v2 scheme
already satisfies as a principle. The number itself is Orobo's own
versioning, not the standard's — v2 here is not equivalent to "EN 18222
v1". If an EN 18222-conformant facade is built (see 18222-01a/18222-08a),
it gets its own version prefix aligned to the standard's numbering rather
than reusing Orobo's /api/v2.

Content type

  • Request bodies: application/json for resource mutations and multipart/form-data for file uploads (compliance documents, importer CSV/XLSX).
  • Successful responses: application/json.
  • Error responses: application/problem+json (RFC 7807). The Content-Type is the discriminator your shared HTTP middleware should use.

Pagination

List endpoints use page/per_page parameters and return a meta block:

GET /api/v2/dpps?page=2&per_page=50
{
  "data": [ /* … */ ],
  "meta": { "page": 2, "per_page": 50, "total_pages": 7, "total_count": 312 }
}

per_page is capped at 100. We also emit a Link header following
RFC 5988:

Link: <https://orobo.io/api/v2/dpps?page=1>; rel="first",
      <https://orobo.io/api/v2/dpps?page=3>; rel="next",
      <https://orobo.io/api/v2/dpps?page=7>; rel="last"

Idempotency

Mutating requests (POST, PATCH, PUT, DELETE) accept an optional
Idempotency-Key header. Send a fresh, opaque string between 16 and 128
characters. We:

  • Hash the request body and persist (application, key, body-hash, response).
  • Replay the cached response (with Idempotency-Replayed: true) if the same key + body is sent again within 24 hours.
  • Return 409 Conflict if the same key is sent with a different body — your retry has diverged and we will not silently double-charge whatever side-effect the request had.

Idempotency cache is keyed by (application, key) so two different
applications cannot collide.

Request IDs

Every response carries X-Request-Id. Either pass your own value in the request
header (we honour it) or let Rails assign one. The same id is recorded in the
audit log row and surfaces inside problem-detail bodies as request_id — quote
it in support tickets.

Error format (RFC 7807)

Errors look like this:

HTTP/1.1 403 Forbidden
Content-Type: application/problem+json

{
  "type":       "https://developers.orobo.tech/errors/forbidden",
  "title":      "Forbidden",
  "status":     403,
  "detail":     "The provided token does not carry the required scope",
  "request_id": "8f14e45f-..."
}

type is a stable URL — discriminate on it in your error handlers, not on the
prose detail. See the Errors reference for the full table.

Validation errors include an errors array of human-readable messages:

{
  "type":   "https://developers.orobo.tech/errors/unprocessable-entity",
  "title":  "Unprocessable Entity",
  "status": 422,
  "detail": "Validation failed",
  "errors": ["Url must be an http(s) URL", "Event types contains unknown event type(s): pizza.delivered"]
}

Tenancy

Every authenticated request executes in the context of the calling
application's organisation. The API will refuse — typically with 403 Forbidden
— any attempt to read or mutate a record that lives in a different org. List
endpoints transparently filter by the calling org; you cannot opt out and you
cannot pass a ?organization_id=… to peek somewhere else.

Time

All timestamps are ISO 8601 with timezone (2026-05-11T13:42:00Z). We never
emit naive timestamps. Send UTC; we will convert if you send something else,
but don't.

Field shapes that look weird but aren't

  • DPP to_partner_json returns field_values and journey_steps even for non-public DPPs. The v1 API used to strip these for non-public records, which broke partners reading their own drafts. The v2 partner shape always returns the full dataset; the anonymous /api/v2/public/dpps/:shortcode endpoint is the only place where field-level filtering applies.
  • Webhook signing_secret is returned in plaintext on POST /webhooks and on POST /webhooks/:id/test only. Other reads expose signing_secret_prefix.