Marketplaces and catalogues
Pull the published catalogue and listing detail without spreadsheets. Filters and pagination match the public 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.
Overview
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.
Pull the published catalogue and listing detail without spreadsheets. Filters and pagination match the public API.
Send inquiries with sourceName and externalId and let the platform route them to the broker. The routing state comes back in the response.
Upload NautiX XML into the review pipeline. Every record gets an ID and import.completed reports the result by webhook.
Quickstart
Three steps: verify the token, fetch the catalogue, send an inquiry. Every example works against the production base URL.
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.
GET /api/partner/me returns the client, scopes and limits. It is a cheap integration health check.
Use /listings for the catalogue, /feed/listings.json for the full feed and POST /leads for inquiries. Every call has an example below.
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" const token = process.env.PORTIGRAM_API_TOKEN;
const base = "https://boatsocean.com";
const me = await fetch(`${base}/api/partner/me`, {
headers: { Authorization: `Bearer ${token}` }
});
console.log(await me.json());
const listings = await fetch(`${base}/api/partner/listings?perPage=2`, {
headers: { Authorization: `Bearer ${token}` }
});
const { items, page } = await listings.json();
console.log(items, page); import os, requests
token = os.environ["PORTIGRAM_API_TOKEN"]
base = "https://boatsocean.com"
headers = {"Authorization": f"Bearer {token}"}
me = requests.get(f"{base}/api/partner/me", headers=headers, timeout=15)
me.raise_for_status()
print(me.json()["partner"])
listings = requests.get(
f"{base}/api/partner/listings",
headers=headers,
params={"perPage": 2},
timeout=15,
)
listings.raise_for_status()
print(listings.json()["items"]) 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.
https://boatsocean.com Production: https://boatsocean.com. Local: http://127.0.0.1:8080. All paths below are relative to the base URL.
Authorization: Bearer ptg_… Keep tokens in a backend or secret manager, never in a browser or Git.
curl -s "https://boatsocean.com/api/partner/me" \
-H "Authorization: Bearer $PORTIGRAM_API_TOKEN" Getting started
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.
X-BoatsOcean-Environment: sandbox A sandbox token uses the normal ptg_… shape; the environment is visible in /partner/me.
sandbox-azimut-55-2024 sandbox-sunreef-80-2022 sandbox-benetti-120-2018 curl -s "https://boatsocean.com/api/partner/me" \
-H "Authorization: Bearer $SANDBOX_PARTNER_TOKEN" Concepts
Scopes are additive. An endpoint requires one scope; when it is missing the API answers 403 insufficient_scope rather than 401.
| Scope | Used by | What 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 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.
Default 120, configurable
Default 10,000, resets at 00:00 UTC
| Header | What to do |
|---|---|
X-RateLimit-Limit | Configured per-minute limit. |
X-RateLimit-Remaining | Requests left in the current window. |
X-RateLimit-Reset | Unix timestamp when the window resets. |
Retry-After | Seconds until a safe retry after 429. |
Endpoints
Every endpoint lists its method, scope, parameters, response example and statuses. The complete machine contract lives in OpenAPI.
A compact view of every operation: click a row to jump to the details.
/me any key GET /listings listings:read GET /listings/{slug} listings:read GET /feed/listings.json feeds:read POST /leads leads:create GET /leads/{id} leads:read GET /imports/{id} imports:read POST /imports/nautix imports:write GET /webhooks webhooks:manage POST /webhooks webhooks:manage PATCH /webhooks/{id} webhooks:manage DELETE /webhooks/{id} webhooks:manage GET /webhook-deliveries webhooks:manage GET /analytics analytics:read Paste a partner token and send a real GET request to the API. The token is not stored or logged.
The response will appear here.
/api/partner/me Use this as the connectivity check: it returns the client, key, granted scopes and configured quotas behind the token.
Auth: Any valid partner token
{
"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/"
} 200401429 /api/partner/listings listings:read 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
| Name | Where | Notes |
|---|---|---|
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. |
{
"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 }
} 200401403429500 /api/partner/listings/{slug} listings:read Returns the yacht card plus localized editorial detail. Pass locale=ru for Russian narrative fields.
Auth: Partner bearer
| Name | Where | Notes |
|---|---|---|
slug | path | Public listing slug. |
locale | query | en or ru, default en. |
{
"yacht": { "slug": "sanlorenzo-sx88-2021", "name": "Sanlorenzo SX88" },
"locale": "en",
"overview": ["…"],
"keySpecs": [{ "label": "Length", "value": "26.7 m" }],
"brokerContact": { "name": "…", "email": "…" }
} 200401403404429500 /api/partner/feed/listings.json feeds:read Stable JSON envelope for scheduled imports: version, generatedAt, listings and page. Defaults to 100 listings per page.
Auth: Partner bearer
{
"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 }
} 200401403429500 /api/partner/leads leads:create The field is yachtSlug, not listingSlug. The API returns 202 because broker routing and webhook delivery happen asynchronously.
Auth: Partner bearer
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"
}' const res = await fetch(`${base}/api/partner/leads`, {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
yachtSlug: "sanlorenzo-sx88-2021",
name: "Client Name",
email: "[email protected]",
message: "Interested in a viewing",
sourceName: "Partner CRM",
externalId: "crm-lead-1001"
})
});
if (res.status !== 202) throw new Error(await res.text());
console.log(await res.json()); payload = {
"yachtSlug": "sanlorenzo-sx88-2021",
"name": "Client Name",
"email": "[email protected]",
"message": "Interested in a viewing",
"sourceName": "Partner CRM",
"externalId": "crm-lead-1001",
}
res = requests.post(f"{base}/api/partner/leads", json=payload, headers=headers, timeout=15)
res.raise_for_status()
print(res.json()) {
"id": "42344296-…",
"status": "accepted",
"routeChannel": "internal",
"routeStatus": "captured",
"createdAt": "2026-10-20T03:00:00Z"
} 202400401403404429500 /api/partner/leads/{id} leads:read 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
| Name | Where | Notes |
|---|---|---|
id | path | Lead UUID returned by POST /leads. |
{
"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"
} 200401403404429 /api/partner/imports/{id} imports:read Track one NautiX record from pending_review to published or rejected.
Auth: Partner bearer
| Name | Where | Notes |
|---|---|---|
id | path | Import UUID returned by POST /imports/nautix. |
{
"id": "10dcdc0a-…",
"sourceName": "PartnerCRM",
"externalId": "AB123",
"status": "pending_review",
"title": "Black Pearl",
"createdAt": "2026-10-20T03:00:00Z"
} 200401403404429 /api/partner/imports/nautix imports:write Send the XML body with Content-Type: application/xml. Listings are staged for review; publishing remains a moderator decision.
Auth: Partner bearer
| Name | Where | Notes |
|---|---|---|
sourceName | query | Source label, default NautiX. |
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 {
"source": "PartnerCRM",
"total": 1,
"imported": 1,
"ids": ["10dcdc0a-…"]
} 202400401403429500 /api/partner/webhooks webhooks:manage Self-service replacement for asking an admin to register a webhook. Signing secrets are never returned after creation.
Auth: Partner bearer
{
"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"
}
]
} 200401403429 /api/partner/webhooks webhooks:manage HTTPS only outside localhost. The signing secret is generated and returned exactly once; store it in your secret manager.
Auth: Partner bearer
{
"url": "https://partner.example.com/hooks/boatsocean",
"events": ["lead.created", "import.completed"]
} {
"id": "ab7068a7-…",
"url": "https://partner.example.com/hooks/boatsocean",
"events": ["lead.created", "import.completed"],
"status": "active",
"secret": "whsec_…",
"createdAt": "2026-10-20T03:00:00Z"
} 201400401403429 /api/partner/webhooks/{id} webhooks:manage Change URL, events or status without rotating the signing secret. Omitted fields stay as they are.
Auth: Partner bearer
| Name | Where | Notes |
|---|---|---|
id | path | Webhook UUID. |
{
"events": ["lead.created", "listing.approved"],
"status": "paused"
} {
"id": "ab7068a7-…",
"url": "https://partner.example.com/hooks/boatsocean",
"events": ["lead.created", "listing.approved"],
"status": "paused",
"updatedAt": "2026-10-20T03:00:00Z"
} 200400401403404429 /api/partner/webhooks/{id} webhooks:manage The webhook must belong to the authenticated client. A foreign or unknown id returns 404.
Auth: Partner bearer
| Name | Where | Notes |
|---|---|---|
id | path | Webhook UUID. |
{ "id": "ab7068a7-…", "status": "deleted" } 200401403404429 /api/partner/webhook-deliveries webhooks:manage Debug failed integrations without exposing lead payloads: status, attempts, last status code and last error only.
Auth: Partner bearer
| Name | Where | Notes |
|---|---|---|
limit | query | 1–100, default 25. |
{
"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"
}
]
} 200401403429 /api/partner/analytics analytics:read Rolling-window request totals, error rate, status breakdown, busiest endpoints and webhook delivery health.
Auth: Partner bearer
| Name | Where | Notes |
|---|---|---|
range | query | 24h, 7d or 30d. Default 24h. |
{
"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
} 200401403429 Nothing found. Change the query or filter.
Concepts
Errors always have the shape { error: { code, message } }. The code is stable for programmatic handling; the message is safe to show to a person.
| HTTP | Code | What 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. |
{
"error": {
"code": "insufficient_scope",
"message": "This token does not grant the scope required by the endpoint."
}
} Resources
Webhooks deliver events to your system asynchronously. Every delivery is signed, retried on failure and visible in /webhook-deliveries.
| Event | When it fires |
|---|---|
lead.created | A partner lead was stored and queued for broker routing. |
listing.approved | A listing was approved and published to the catalogue. |
listing.updated | A listing's content or moderation state changed. |
price.changed | The asking price changed, with previous and new amounts. |
import.completed | A NautiX XML upload finished parsing and staging. |
| Header | What to do |
|---|---|
X-Portigram-Event | lead.created | import.completed |
X-Portigram-Delivery | Delivery UUID |
X-Portigram-Timestamp | Unix seconds |
X-Portigram-Signature | sha256=<HMAC-SHA256(secret, timestamp + "." + rawBody)> |
User-Agent | Portigram-Webhooks/1.0 |
The signature is HMAC-SHA256 over timestamp + "." + the raw request body. Compare in constant time and reject stale timestamps.
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)
); import hmac, hashlib
expected = "sha256=" + hmac.new(
os.environ["WEBHOOK_SECRET"].encode(),
f"{timestamp}.".encode() + raw_body,
hashlib.sha256,
).hexdigest()
ok = hmac.compare_digest(expected, signature_header) 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.
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 |
| Retries | up to 6 attempts, exponential backoff 2–32 minutes |
| Visibility | status and last HTTP code in /webhook-deliveries |
| Incidents | public status page and changelog; 4-hour recovery target |
Resources
TypeScript and Python clients are generated from the same OpenAPI spec. They cover every Partner operation, including sandbox, status reads and webhooks.
import { PartnerClient } from "@boatsocean/partner-sdk"; Typed fetch client for Node, Bun, Deno and the browser.
from boatsocean_partner import PartnerClient Typed requests client with TypedDict models.
npm run sdk:partner Sources and READMEs live in the repository's sdk/ directory.
Resources
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.
Resources
The next layer is operating the public contract: SDK releases, alert tuning, OpenBoats extraction and the internal-route programme.
Alguns conteúdos editoriais e descrições de fornecedores são apresentados no idioma original.