Developer platform / Partner API
API is live v1 · Pilot REST · JSON OpenAPI 3.1

BoatsOcean Partner API

A REST API for brokers, dealers, aggregators and CRMs: yacht catalogue, leads, NautiX feeds, webhooks and usage analytics. One bearer token, predictable errors, OpenAPI 3.1.

14operations
8scopes
5events
99.5%webhook SLA

Overview

One API for the yacht market

The Partner API serves the same verified data a buyer sees on BoatsOcean and accepts the reverse flow: inquiries, NautiX feeds and events. An integration is built around an API client, scoped keys and stable external IDs.

Marketplaces and catalogues

Pull the published catalogue and listing detail without spreadsheets. Filters and pagination match the public API.

Broker CRMs

Send inquiries with sourceName and externalId and let the platform route them to the broker. The routing state comes back in the response.

Feed aggregators

Upload NautiX XML into the review pipeline. Every record gets an ID and import.completed reports the result by webhook.

How the API is shaped
  • Resources, not actions: catalogue, listing, lead, webhook, analytics.
  • Scoped tokens: access is granted by area, not all-or-nothing.
  • Explicit error codes: 401 token, 403 scope, 404 data, 429 limit.
  • Asynchronous side effects: 202 plus webhooks instead of holding the request.
  • OpenAPI 3.1 as the source of truth, shipped next to this guide.

Quickstart

Quickstart

Three steps: verify the token, fetch the catalogue, send an inquiry. Every example works against the production base URL.

  1. Get a token

    A BoatsOcean admin creates the API client and a scoped key. The token is shown once — store it in a secret manager. Never ship it to a browser.

  2. Verify connectivity

    GET /api/partner/me returns the client, scopes and limits. It is a cheap integration health check.

  3. Sync data

    Use /listings for the catalogue, /feed/listings.json for the full feed and POST /leads for inquiries. Every call has an example below.

curl
export BASE="https://boatsocean.com"
export PORTIGRAM_API_TOKEN="ptg_…"

# 1. Connectivity and granted scopes
curl -s "$BASE/api/partner/me" \
  -H "Authorization: Bearer $PORTIGRAM_API_TOKEN"

# 2. Two listings
curl -s "$BASE/api/partner/listings?perPage=2" \
  -H "Authorization: Bearer $PORTIGRAM_API_TOKEN"

Authentication

Authentication

Every partner request uses a bearer token. A key belongs to an API client and a scope set; revoking the key or suspending the client stops access immediately.

Base URL

https://boatsocean.com

Production: https://boatsocean.com. Local: http://127.0.0.1:8080. All paths below are relative to the base URL.

Authorization

Authorization: Bearer ptg_…

Keep tokens in a backend or secret manager, never in a browser or Git.

Key rules

  • Header: Authorization: Bearer ptg_…
  • The secret is shown once when the key is created.
  • One key has one scope set; use separate keys for separate integrations.
  • Set an expiry and rotate before it lapses: the old key is revoked automatically.
  • Keep tokens in a backend or secret manager, never in a browser or Git.
curl
curl -s "https://boatsocean.com/api/partner/me" \
  -H "Authorization: Bearer $PORTIGRAM_API_TOKEN"

Getting started

Sandbox

A sandbox client gets deterministic test yachts and never touches the production catalogue. The token is a normal bearer token; the server routes it to the sandbox by key. Responses carry X-BoatsOcean-Environment: sandbox.

Sandbox

X-BoatsOcean-Environment: sandbox

A sandbox token uses the normal ptg_… shape; the environment is visible in /partner/me.

Fixtures

sandbox-azimut-55-2024 sandbox-sunreef-80-2022 sandbox-benetti-120-2018
  • Three fixed yachts: Azimut 55, Sunreef 80 and Benetti Classic 120.
  • Leads, imports, webhooks and analytics live in the sandbox process memory.
  • Sandbox webhooks are delivered immediately and never enter the production queue.
  • No real email, payments or publications: only the API contract.
curl
curl -s "https://boatsocean.com/api/partner/me" \
  -H "Authorization: Bearer $SANDBOX_PARTNER_TOKEN"

Concepts

Scopes and access

Scopes are additive. An endpoint requires one scope; when it is missing the API answers 403 insufficient_scope rather than 401.

ScopeUsed byWhat it grants
listings:read GET /listings, GET /listings/{slug} Read the partner-visible sale catalogue and a single listing.
feeds:read GET /feed/listings.json Pull the paginated JSON feed for catalogue synchronisation.
leads:create POST /leads Create buyer inquiries and route them to the owning broker.
leads:read GET /leads/{id} Read the routing status of leads created by this client.
imports:write POST /imports/nautix Upload NautiX XML listings into the review pipeline.
imports:read GET /imports/{id} Read the moderation status of an imported listing.
analytics:read GET /analytics Read request volume, error rate, endpoint and webhook health.
webhooks:manage GET/POST/PATCH /webhooks, DELETE /webhooks/{id}, GET /webhook-deliveries Manage webhook subscriptions and inspect delivery attempts.

Concepts

Limits and quotas

Limits are configured per API client. Every partner response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix seconds). On 429, honour Retry-After.

Requests per minute 120

Default 120, configurable

Requests per day 10 000

Default 10,000, resets at 00:00 UTC

HeaderWhat to do
X-RateLimit-LimitConfigured per-minute limit.
X-RateLimit-RemainingRequests left in the current window.
X-RateLimit-ResetUnix timestamp when the window resets.
Retry-AfterSeconds until a safe retry after 429.
429 rate_limited is the per-minute limit; 429 daily_quota_exceeded is the daily quota. Both are safe to retry after Retry-After.

Endpoints

Endpoint reference

Every endpoint lists its method, scope, parameters, response example and statuses. The complete machine contract lives in OpenAPI.

14 endpoints

Try it now

Paste a partner token and send a real GET request to the API. The token is not stored or logged.

Base URL:
Status: — Time: —
The response will appear here.
GET /api/partner/me

Partner profile and limits

Use this as the connectivity check: it returns the client, key, granted scopes and configured quotas behind the token.

Auth: Any valid partner token

Response

200 response
{
  "partner": {
    "clientId": "7e8728a1-…",
    "keyId": "386a3191-…",
    "name": "Docs Demo Partner",
    "scopes": ["listings:read", "feeds:read", "leads:create"],
    "rateLimitPerMinute": 120,
    "dailyQuota": 10000
  },
  "apiVersion": "1.0",
  "docsUrl": "/developers/api/"
}
Statuses: 200401429
GET /api/partner/listings listings:read

List partner-visible yachts

Same filters and pagination as the public catalogue, but the response is scoped to what the API client is allowed to see.

Auth: Partner bearer

NameWhereNotes
page query Page number, default 1.
perPage query 1–100, default 12.
type / builder / location query Catalogue facet slugs.
minPrice / maxPrice query Integer price bounds in the listing currency.

Response

200 response
{
  "items": [
    {
      "id": "00000000-…-0601",
      "slug": "sanlorenzo-sx88-2021",
      "name": "Sanlorenzo SX88",
      "builder": "Sanlorenzo",
      "price": { "amount": 6950000, "currency": "EUR", "display": "€6,950,000" }
    }
  ],
  "page": { "page": 1, "perPage": 12, "totalItems": 4, "totalPages": 1 }
}
Statuses: 200401403429500
GET /api/partner/listings/{slug} listings:read

Listing detail

Returns the yacht card plus localized editorial detail. Pass locale=ru for Russian narrative fields.

Auth: Partner bearer

NameWhereNotes
slug path Public listing slug.
locale query en or ru, default en.

Response

200 response
{
  "yacht": { "slug": "sanlorenzo-sx88-2021", "name": "Sanlorenzo SX88" },
  "locale": "en",
  "overview": ["…"],
  "keySpecs": [{ "label": "Length", "value": "26.7 m" }],
  "brokerContact": { "name": "…", "email": "…" }
}
Statuses: 200401403404429500
GET /api/partner/feed/listings.json feeds:read

Catalogue sync feed

Stable JSON envelope for scheduled imports: version, generatedAt, listings and page. Defaults to 100 listings per page.

Auth: Partner bearer

Response

200 response
{
  "version": "2026-05-24",
  "generatedAt": "2026-10-20T03:00:00Z",
  "items": [{ "slug": "sanlorenzo-sx88-2021", "name": "Sanlorenzo SX88" }],
  "page": { "page": 1, "perPage": 100, "totalItems": 4, "totalPages": 1 }
}
Statuses: 200401403429500
POST /api/partner/leads leads:create

Create and route a lead

The field is yachtSlug, not listingSlug. The API returns 202 because broker routing and webhook delivery happen asynchronously.

Auth: Partner bearer

Request

curl
curl -s -X POST "$BASE/api/partner/leads" \
  -H "Authorization: Bearer $PORTIGRAM_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "yachtSlug": "sanlorenzo-sx88-2021",
    "name": "Client Name",
    "email": "[email protected]",
    "message": "Interested in a viewing",
    "sourceName": "Partner CRM",
    "externalId": "crm-lead-1001"
  }'

Response

202 Accepted
{
  "id": "42344296-…",
  "status": "accepted",
  "routeChannel": "internal",
  "routeStatus": "captured",
  "createdAt": "2026-10-20T03:00:00Z"
}
Statuses: 202400401403404429500
GET /api/partner/leads/{id} leads:read

Lead routing status

Only leads created by the authenticated client are visible. Use it to poll routing after a 202 instead of polling the mailbox.

Auth: Partner bearer

NameWhereNotes
id path Lead UUID returned by POST /leads.

Response

200 response
{
  "id": "42344296-…",
  "status": "new",
  "routeChannel": "internal",
  "routeStatus": "captured",
  "sourceName": "Partner CRM",
  "externalId": "crm-lead-1001",
  "yachtSlug": "sanlorenzo-sx88-2021",
  "createdAt": "2026-10-20T03:00:00Z"
}
Statuses: 200401403404429
GET /api/partner/imports/{id} imports:read

Import review status

Track one NautiX record from pending_review to published or rejected.

Auth: Partner bearer

NameWhereNotes
id path Import UUID returned by POST /imports/nautix.

Response

200 response
{
  "id": "10dcdc0a-…",
  "sourceName": "PartnerCRM",
  "externalId": "AB123",
  "status": "pending_review",
  "title": "Black Pearl",
  "createdAt": "2026-10-20T03:00:00Z"
}
Statuses: 200401403404429
POST /api/partner/imports/nautix imports:write

Import NautiX XML

Send the XML body with Content-Type: application/xml. Listings are staged for review; publishing remains a moderator decision.

Auth: Partner bearer

NameWhereNotes
sourceName query Source label, default NautiX.

Request

application/xml
curl -X POST "$BASE/api/partner/imports/nautix?sourceName=PartnerCRM" \
  -H "Authorization: Bearer $PORTIGRAM_API_TOKEN" \
  -H "Content-Type: application/xml" \
  --data-binary @NautiX.xml

Response

202 response
{
  "source": "PartnerCRM",
  "total": 1,
  "imported": 1,
  "ids": ["10dcdc0a-…"]
}
Statuses: 202400401403429500
GET /api/partner/webhooks webhooks:manage

List webhook subscriptions

Self-service replacement for asking an admin to register a webhook. Signing secrets are never returned after creation.

Auth: Partner bearer

Response

200 response
{
  "items": [
    {
      "id": "ab7068a7-…",
      "clientId": "7e8728a1-…",
      "url": "https://partner.example.com/hooks/boatsocean",
      "events": ["lead.created", "import.completed"],
      "status": "active",
      "createdAt": "2026-10-20T03:00:00Z"
    }
  ]
}
Statuses: 200401403429
POST /api/partner/webhooks webhooks:manage

Register a webhook

HTTPS only outside localhost. The signing secret is generated and returned exactly once; store it in your secret manager.

Auth: Partner bearer

Request

application/xml
{
  "url": "https://partner.example.com/hooks/boatsocean",
  "events": ["lead.created", "import.completed"]
}

Response

201 response
{
  "id": "ab7068a7-…",
  "url": "https://partner.example.com/hooks/boatsocean",
  "events": ["lead.created", "import.completed"],
  "status": "active",
  "secret": "whsec_…",
  "createdAt": "2026-10-20T03:00:00Z"
}
Statuses: 201400401403429
PATCH /api/partner/webhooks/{id} webhooks:manage

Update a webhook

Change URL, events or status without rotating the signing secret. Omitted fields stay as they are.

Auth: Partner bearer

NameWhereNotes
id path Webhook UUID.

Request

curl
{
  "events": ["lead.created", "listing.approved"],
  "status": "paused"
}

Response

200 response
{
  "id": "ab7068a7-…",
  "url": "https://partner.example.com/hooks/boatsocean",
  "events": ["lead.created", "listing.approved"],
  "status": "paused",
  "updatedAt": "2026-10-20T03:00:00Z"
}
Statuses: 200400401403404429
DELETE /api/partner/webhooks/{id} webhooks:manage

Deactivate a webhook

The webhook must belong to the authenticated client. A foreign or unknown id returns 404.

Auth: Partner bearer

NameWhereNotes
id path Webhook UUID.

Response

200 response
{ "id": "ab7068a7-…", "status": "deleted" }
Statuses: 200401403404429
GET /api/partner/webhook-deliveries webhooks:manage

Webhook delivery log

Debug failed integrations without exposing lead payloads: status, attempts, last status code and last error only.

Auth: Partner bearer

NameWhereNotes
limit query 1–100, default 25.

Response

200 response
{
  "items": [
    {
      "id": "…",
      "webhookId": "ab7068a7-…",
      "eventType": "lead.created",
      "status": "delivered",
      "attempts": 1,
      "lastStatusCode": 200,
      "createdAt": "2026-10-20T03:00:00Z",
      "deliveredAt": "2026-10-20T03:00:01Z"
    }
  ]
}
Statuses: 200401403429
GET /api/partner/analytics analytics:read

API usage analytics

Rolling-window request totals, error rate, status breakdown, busiest endpoints and webhook delivery health.

Auth: Partner bearer

NameWhereNotes
range query 24h, 7d or 30d. Default 24h.

Response

200 response
{
  "range": "24h",
  "requests": 1240,
  "errors": 12,
  "successRate": 99.03,
  "byStatus": { "200": 1204, "202": 24, "404": 8, "429": 4 },
  "topEndpoints": [
    { "method": "GET", "path": "/api/partner/listings", "requests": 820, "errors": 2 }
  ],
  "webhookDeliveries": 48,
  "webhookFailures": 1
}
Statuses: 200401403429

Concepts

Errors

Errors always have the shape { error: { code, message } }. The code is stable for programmatic handling; the message is safe to show to a person.

HTTPCodeWhat to do
400 invalid_json Body is not valid JSON. Unknown fields are rejected.
400 validation_error Required fields are missing or malformed.
400 invalid_nautix The XML does not match the NautiX feed contract.
400 webhook_error Webhook URL, events or status are invalid.
401 missing_token No Authorization: Bearer header.
401 invalid_token Token is unknown, revoked or the client is suspended.
401 token_expired Key expiry has passed. Rotate the key.
403 insufficient_scope Token lacks the scope required by the endpoint.
404 listing_not_found The yacht slug is not published or does not exist.
404 not_found The webhook belongs to another client or does not exist.
409 import_conflict This source/external ID is already owned by another API client.
429 rate_limited Per-minute limit exceeded. Honour Retry-After.
429 daily_quota_exceeded Daily quota exhausted. Resets at 00:00 UTC.
500 store_error Unexpected server error. Safe to retry with backoff.
403 Forbidden
{
  "error": {
    "code": "insufficient_scope",
    "message": "This token does not grant the scope required by the endpoint."
  }
}

Resources

Webhooks

Webhooks deliver events to your system asynchronously. Every delivery is signed, retried on failure and visible in /webhook-deliveries.

Events

EventWhen it fires
lead.createdA partner lead was stored and queued for broker routing.
listing.approvedA listing was approved and published to the catalogue.
listing.updatedA listing's content or moderation state changed.
price.changedThe asking price changed, with previous and new amounts.
import.completedA NautiX XML upload finished parsing and staging.

Delivery headers

HeaderWhat to do
X-Portigram-Eventlead.created | import.completed
X-Portigram-DeliveryDelivery UUID
X-Portigram-TimestampUnix seconds
X-Portigram-Signaturesha256=<HMAC-SHA256(secret, timestamp + "." + rawBody)>
User-AgentPortigram-Webhooks/1.0

Signature verification

The signature is HMAC-SHA256 over timestamp + "." + the raw request body. Compare in constant time and reject stale timestamps.

Node.js
import crypto from "node:crypto";

// rawBody must be the exact bytes received, before JSON.parse.
const expected = "sha256=" + crypto
  .createHmac("sha256", process.env.WEBHOOK_SECRET)
  .update(`${timestamp}.${rawBody}`)
  .digest("hex");

const ok = crypto.timingSafeEqual(
  Buffer.from(expected),
  Buffer.from(signatureHeader)
);
Important: sign the exact raw body bytes before JSON.parse, otherwise the signature will not match.

Retries

Up to 6 attempts with exponential backoff (2, 4, 8, 16, 32 minutes). After the final failure the delivery is marked failed and stays in the log.

Webhook delivery SLA

The pilot SLA applies to live clients and is published on the status page. Sandbox deliveries are immediate and excluded from the SLA.

First attempt≤ 60 seconds after the event
Successful delivery≥ 99.5% per calendar month
Retriesup to 6 attempts, exponential backoff 2–32 minutes
Visibilitystatus and last HTTP code in /webhook-deliveries
Incidentspublic status page and changelog; 4-hour recovery target

Resources

SDKs

TypeScript and Python clients are generated from the same OpenAPI spec. They cover every Partner operation, including sandbox, status reads and webhooks.

TypeScript SDK

import { PartnerClient } from "@boatsocean/partner-sdk";

Typed fetch client for Node, Bun, Deno and the browser.

Python SDK

from boatsocean_partner import PartnerClient

Typed requests client with TypedDict models.

Regenerate both SDKs
npm run sdk:partner

Sources and READMEs live in the repository's sdk/ directory.

Resources

Versioning

The current version is 1.0.0-pilot. Backwards-compatible fields are added without a version bump; removal or semantic change requires a new version with a deprecation window.

Changelog

  • Sandbox clients can be created in the cabinet; live clients stay admin-only.
  • Key expiry, rotation with revocation, and expiring-key warnings.
  • PATCH /webhooks/{id}, lead status and import status.
  • listing.approved, listing.updated and price.changed events.
  • Automatic status incidents and an alert webhook.
  • TypeScript/Python SDKs from OpenAPI plus public status/changelog.

Resources

What is next

The next layer is operating the public contract: SDK releases, alert tuning, OpenBoats extraction and the internal-route programme.

  • Publish the SDKs to npm and PyPI with signed releases.
  • Tune alert thresholds and on-call routing for status incidents.
  • CI sync for the standalone OpenBoats repository.
  • Promote internal routes into the public contract through the changelog.
  • A sandbox seed API for partner-specific test data.

Časť redakčného obsahu a opisov dodávateľov sa zobrazuje v pôvodnom jazyku.

Open in OpenStreetMap