Charter Boats API
Boats

Import Boat

Import a boat listing with images and amenities

POST/import/boat

Import a new boat listing in a single API call. Handles creating the boat, storing image URLs, linking amenities, and auto-matching to a marina location.

Authentication

Requires API key in the X-API-Key header.

  • Owner API key (cb_live_*): Boat is created under your company automatically. No need to specify owner fields.
  • Admin API key: Requires owner_id or owner_email in the request body to identify who the boat belongs to.
X-API-Key: cb_live_your_api_key_here

Request Body

Required Fields

FieldTypeDescription
titlestringBoat name/title
boat_typestringOne of: yacht, catamaran, sailboat, motorboat, rib, other
capacityintegerMaximum guests (must be at least 1)

Optional Fields

FieldTypeDefaultDescription
descriptionstringFull description (supports markdown)
price_per_daynumberDaily rate
length_ftnumberLength in feet
yearintegerYear built
cabinsintegerNumber of cabins
berthsintegerNumber of berths
toiletsintegerNumber of toilets
modelstringBoat model name
manufacturer_namestringManufacturer name (looked up or auto-created)
rental_typestringbareboatbareboat, skippered, or no_licence_needed
fuel_includedbooleanfalseWhether fuel is included
security_depositnumberSecurity deposit amount
external_booking_urlstringURL for external booking
instant_bookbooleanfalseAllow instant booking
cancellation_policystringmoderateflexible, moderate, or strict
is_publishedbooleanfalseWhether the listing is visible to guests

Location Fields

The endpoint auto-matches to an existing marina by coordinates (within ~1km) or by location name. If coordinates are provided but no match is found, a new location is created.

FieldTypeDescription
location_citystringCity where boat is based
location_countrystringCountry
location_addressstringFull address or marina name (used for location name matching)
latitudenumberGPS latitude
longitudenumberGPS longitude

Deduplication Fields

When both fields are provided, the endpoint checks for existing imports to prevent duplicates.

FieldTypeDescription
import_sourcestringPlatform name (e.g. boataround)
import_source_idstringUnique ID on that platform

Owner Identification (admin API key only)

FieldTypeDescription
owner_idstringUser UUID
owner_emailstringOwner's email (creates user + company if not found)
owner_namestringOwner's display name (used when creating new user)
company_idstringAssign to a specific company (overrides auto-detection)

Images

Array of image URLs or image objects. The first image is set as primary unless specified otherwise.

{
  "images": [
    "https://example.com/image1.jpg",
    { "url": "https://example.com/image2.jpg", "is_primary": true }
  ],
  "download_images": true
}
FieldTypeDefaultDescription
imagesarrayImage URLs (strings) or objects with url and optional is_primary
download_imagesbooleanfalseDownload images to server storage instead of keeping source URLs

Amenities

Array of amenity names (strings). Matched case-insensitively against standard amenities. Unmatched names are saved as custom amenities.

{
  "amenities": ["WiFi", "Air Conditioning", "Snorkeling Equipment"]
}

Request

curl -X POST https://charter.boats/api/import/boat \
  -H "Content-Type: application/json" \
  -H "X-API-Key: cb_live_your_api_key" \
  -d '{
    "title": "BALI Catspace - Luxury Catamaran",
    "description": "Beautiful 40ft catamaran with 4 cabins.",
    "boat_type": "catamaran",
    "capacity": 8,
    "price_per_day": 850,
    "length_ft": 40,
    "year": 2023,
    "location_city": "Lefkada",
    "location_country": "Greece",
    "latitude": 38.8336,
    "longitude": 20.7066,
    "manufacturer_name": "Bali Catamarans",
    "rental_type": "bareboat",
    "cancellation_policy": "moderate",
    "images": [
      { "url": "https://example.com/exterior.jpg", "is_primary": true },
      "https://example.com/interior.jpg"
    ],
    "amenities": ["WiFi", "Air Conditioning", "GPS/Navigation"]
  }'

Response

{
  "success": true,
  "duplicate": false,
  "boat": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "title": "BALI Catspace - Luxury Catamaran",
    "boat_type": "catamaran",
    "capacity": 8,
    "length_ft": 40,
    "year": 2023,
    "price_per_day": 850,
    "instant_book": false,
    "cancellation_policy": "moderate",
    "is_active": true,
    "is_published": false,
    "company": {
      "id": "company-uuid",
      "name": "Sail Greece",
      "slug": "sail-greece"
    },
    "manufacturer": {
      "id": "mfr-uuid",
      "name": "Bali Catamarans",
      "slug": "bali-catamarans"
    },
    "images": [
      {
        "id": "img-uuid",
        "url": "https://example.com/exterior.jpg",
        "is_primary": true,
        "sort_order": 0
      }
    ],
    "amenities": [
      { "id": "amenity-uuid", "name": "WiFi", "category": "entertainment" }
    ]
  },
  "images_uploaded": 2,
  "images_downloaded": 0,
  "amenities_added": 3,
  "custom_amenities_added": 0,
  "view_url": "https://charter.boats/boats/550e8400-e29b-41d4-a716-446655440000"
}

Response Fields

FieldTypeDescription
successbooleanWhether the import succeeded
duplicatebooleantrue if an existing boat was returned (same import_source + import_source_id under the same company)
boatobjectCreated (or existing) boat with company, manufacturer, images, and amenities
images_uploadedintegerNumber of image records created
images_downloadedintegerNumber of images downloaded to storage (when download_images: true)
amenities_addedintegerNumber of standard amenities matched and linked
custom_amenities_addedintegerNumber of unmatched amenities saved as custom
view_urlstringPublic URL to view the listing

Deduplication Behavior

When import_source and import_source_id are both provided:

  • Same company: Returns the existing boat with duplicate: true
  • Different company: Returns 409 Conflict

Errors

StatusMessage
400title is required
400boat_type is required
400boat_type must be one of: yacht, catamaran, sailboat, motorboat, rib, other
400capacity is required and must be at least 1
400rental_type must be one of: bareboat, skippered, no_licence_needed
400cancellation_policy must be one of: flexible, moderate, strict
400Owner identification required: provide owner_id or owner_email
401API key required. Include X-API-Key header.
401Invalid API key
409This boat has already been imported by another company

On this page