Marketplace API

Marketplace API

Put Boatwork's marine service marketplace inside your own website.

✓ Bearer key auth✓ Sandbox and production

Marketplace API

Put Boatwork's marine service marketplace inside your own website. Your site owns the experience. Boatwork handles the parts that have to be right every time:

  • the questions for each service;
  • location checks;
  • matching and ranking pros;
  • owner verification;
  • the request the pro receives.

Every request lands in the pro's Boatwork Business Center like any other lead, and live bookings use the pro's own Stripe account.

It runs on the same matching and rules as boatwork.co.

Sandbox and production

Every partner starts in the sandbox. A sandbox key works against real data with low limits, so you can build and test your integration. When you are ready to launch, request production access from the Marketplace API page; a partner agreement unlocks production limits.

SandboxProduction
API calls per day2005000
New projects per day255000
Owner requests per day51000
Booking sessions per day102000
Your name in Boatwork emails"a partner website"Your display name

Over a limit, the API answers 429 with PARTNER_QUOTA_EXCEEDED and the limit in detail.

Authentication

Create a partner on the Marketplace API page to get a key. Send it on every request:

Authorization: Bearer bw_public_…

Call the API from your server, never from a browser. Keep the key secret and rotate it from the Marketplace API page if it leaks.

Search and request a pro

The flow mirrors boatwork.co: pick a service, answer its questions, confirm a location, choose up to three pros, and the owner verifies by email.

1. List services

curl https://boatwork.co/api/v1/marketplace/specialties/ -H "Authorization: Bearer $KEY"

2. Get the questions for a service

curl https://boatwork.co/api/v1/marketplace/specialties/boat-mechanics-engine-repair/funnel/ -H "Authorization: Bearer $KEY"

Show every question. single questions take one choice and multiple questions take one or more. Cache the funnel by version.

3. Create a project. Use a Google Places placeId the owner picked.

curl -X POST https://boatwork.co/api/v1/marketplace/projects/ -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{
  "specialtySlug": "boat-mechanics-engine-repair",
  "location": { "placeId": "ChIJ…", "text": "Fort Lauderdale, FL" },
  "answers": [{ "questionId": "…", "choiceIds": ["…"] }],
  "description": "Twin outboards, port engine will not start.",
  "clientReference": "your-id-123"
}'

4. Show ranked pros

curl "https://boatwork.co/api/v1/marketplace/projects/$PROJECT_ID/candidates/?page=1" -H "Authorization: Bearer $KEY"

coverage.status is covered, thin or none. The owner can only request pros returned here.

5. Send the request

curl -X POST https://boatwork.co/api/v1/marketplace/projects/$PROJECT_ID/requests/ -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{
  "owner": { "firstName": "Dana", "email": "dana@example.com" },
  "contractorSlugs": ["harbor-marine"],
  "ownerConsent": { "confirmed": true }
}'

Boatwork emails the owner a code and a confirmation link, and no pro is contacted until the owner confirms. After that, the pros get the request in Boatwork, and you receive project.confirmed.

When no pro covers the area

If coverage.status is none, choose how to handle it:

curl -X POST https://boatwork.co/api/v1/marketplace/projects/$PROJECT_ID/no-coverage/ -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{ "handling": "boatwork_rescue", "owner": { "firstName": "Dana", "email": "dana@example.com" }, "ownerConsent": { "confirmed": true } }'
  • boatwork_rescue: after the owner verifies, Boatwork looks for a pro and keeps the owner updated.
  • notify_when_covered: Boatwork never contacts the owner. It watches the area for up to 90 days (watchDays) and sends you coverage.found when a pro appears.

Live booking

Pros on Storefront Pro or above can be booked directly. Booking runs in a Boatwork window on your page, much like Stripe Checkout. The owner picks a time, enters their details and pays in an embedded Stripe form on the pro's own Stripe account.

1. Check what can be booked

curl https://boatwork.co/api/v1/marketplace/pros/harbor-marine/booking-options/ -H "Authorization: Bearer $KEY"

2. Create a booking session (server side)

curl -X POST https://boatwork.co/api/v1/marketplace/booking-sessions/ -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -d '{
  "proSlug": "harbor-marine",
  "itemId": "…",
  "returnUrl": "https://yoursite.com/booking/done",
  "clientReference": "your-id-123"
}'

The session URL is valid for 30 minutes and works once. returnUrl must be on one of your allowed origins.

3. Open it on your page

<script src="https://boatwork.co/embed/booking.js" async></script>
<script>
  // url: the session URL from step 2
  Boatwork.openBooking(url, {
    onBooked: function (detail) { /* detail.bookingId, detail.status */ },
    onClose: function () {}
  });
</script>

The window only opens on the allowed origins you set on the Marketplace API page. The window has an "Open in a new window" link. Use it as the fallback if a payment method needs its own page; Stripe recommends not nesting its checkout in another frame.

A booking is requested when the pro confirms each booking (the card is held) and paid when the pro takes instant bookings. You receive booking.requested, booking.confirmed, booking.cancelled and booking.rescheduled.

Webhooks

Set a webhook URL on the Marketplace API page. Each event is a POST with a JSON body { id, type, createdAt, data } and these headers:

Boatwork-Event: project.confirmed
Boatwork-Webhook-Id: …
Boatwork-Signature: t=1730640000,v1=<hex>

Verify the signature with your webhook secret:

import crypto from 'node:crypto';

function verify(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(',').map(p => p.split('=')));
  const expected = crypto.createHmac('sha256', secret)
    .update(`${parts.t}.${rawBody}`).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}

Answer with any 2xx. Failed deliveries are retried for about 24 hours.

EventWhen
project.confirmedThe owner confirmed a request or a Boatwork rescue
coverage.foundA watched area now has a pro
coverage.watch_expiredA coverage watch ended without a pro
booking.requested / booking.confirmed / booking.cancelled / booking.rescheduledBooking lifecycle

Status

  • GET /api/v1/marketplace/projects/{id}/ returns the project status, the pros contacted and any coverage watch.
  • GET /api/v1/marketplace/booking-sessions/{id}/ returns the session and booking status.

Errors

Every error is { "success": false, "error": "<CODE>", "detail": … }. Common codes:

CodeMeaning
PARTNER_SCOPE_REQUIRED / PARTNER_NOT_FOUND / PARTNER_DISABLEDThe key cannot use the Marketplace API
ANSWERS_INVALIDAnswers do not match the current questions; detail lists each problem
CONTRACTOR_NOT_IN_CANDIDATESRequest only pros returned by candidates
COVERAGE_AVAILABLEPros exist; use requests instead of no-coverage
RETURN_URL_NOT_ALLOWEDAdd the origin on the Marketplace API page
PARTNER_QUOTA_EXCEEDEDDaily sandbox or production limit reached
PROJECT_EXPIREDProjects last 24 hours; start a new one

The full machine-readable spec is at https://developers.boatwork.co/marketplace/openapi.json.