BoatOps Inventory Provider API (1.0.0-alpha.3)

Download OpenAPI specification:

Versioned inventory command contract owned by BoatOps.

Local alpha contract. Inventory decisions are final only after BoatOps commits the command transaction. No private operator data or production credentials are included.

Availability

Short-lived availability snapshots; commands always re-check.

Check a short-lived availability snapshot

Authorizations:
bearerAuth
Request Body schema: application/json
required
boat_id
required
integer (PositiveObjectId) >= 1
trip_template_id
required
integer (PositiveObjectId) >= 1
starts_at
required
string <date-time>

Business interval start in UTC.

ends_at
required
string <date-time>

Business interval end; interval semantics are half-open.

Responses

Request samples

Content type
application/json
{
  • "boat_id": 1,
  • "trip_template_id": 1,
  • "starts_at": "2019-08-24T14:15:22Z",
  • "ends_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  • "organization_id": 1,
  • "boat_id": 1,
  • "available": true,
  • "occupied_start": "2019-08-24T14:15:22Z",
  • "occupied_end": "2019-08-24T14:15:22Z",
  • "inventory_revision": 0,
  • "occurred_at": "2019-08-24T14:15:22Z",
  • "business_timezone": "string",
  • "code": "string",
  • "message": "string",
  • "retryable": true,
  • "manual_action_required": true
}

Holds

Temporary inventory allocations with explicit expiry.

Create a temporary allocation

Requires Idempotency-Key and returns inventory_revision.

Authorizations:
bearerAuth
header Parameters
Idempotency-Key
required
string [ 8 .. 255 ] characters

Stable key scoped to authenticated organization and operation.

Request Body schema: application/json
required
boat_id
required
integer (PositiveObjectId) >= 1
trip_template_id
required
integer (PositiveObjectId) >= 1
starts_at
required
string <date-time>
ends_at
required
string <date-time>

Business interval end; interval semantics are half-open.

external_reference
required
string (ExternalReference) [ 1 .. 255 ] characters
expires_at
required
string <date-time>

Explicit deadline; the contract has no deployment-specific default.

Responses

Request samples

Content type
application/json
{
  • "boat_id": 1,
  • "trip_template_id": 1,
  • "starts_at": "2019-08-24T14:15:22Z",
  • "ends_at": "2019-08-24T14:15:22Z",
  • "external_reference": "string",
  • "expires_at": "2019-08-24T14:15:22Z"
}

Response samples

Content type
application/json
{
  • "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  • "idempotency_key": "string",
  • "organization_id": 1,
  • "hold_id": 1,
  • "external_reference": "string",
  • "status": "ACTIVE",
  • "code": "HOLD_CREATED",
  • "inventory_revision": 1,
  • "expires_at": "2019-08-24T14:15:22Z",
  • "occurred_at": "2019-08-24T14:15:22Z",
  • "business_timezone": "string"
}

Release an active HOLD

Requires Idempotency-Key and returns inventory_revision.

Authorizations:
bearerAuth
path Parameters
id
required
integer >= 1
header Parameters
Idempotency-Key
required
string [ 8 .. 255 ] characters

Stable key scoped to authenticated organization and operation.

Request Body schema: application/json
required
external_reference
required
string (ExternalReference) [ 1 .. 255 ] characters

Responses

Request samples

Content type
application/json
{
  • "external_reference": "string"
}

Response samples

Content type
application/json
{
  • "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  • "idempotency_key": "string",
  • "organization_id": 1,
  • "hold_id": 1,
  • "external_reference": "string",
  • "status": "ACTIVE",
  • "code": "HOLD_CREATED",
  • "inventory_revision": 1,
  • "expires_at": "2019-08-24T14:15:22Z",
  • "occurred_at": "2019-08-24T14:15:22Z",
  • "business_timezone": "string"
}

Bookings

Confirmation, amendment, and cancellation commands.

Confirm an active HOLD into one booking and one trip

Requires Idempotency-Key and a private immutable rate snapshot. The success response and outbox event intentionally omit monetary fields.

Authorizations:
bearerAuth
header Parameters
Idempotency-Key
required
string [ 8 .. 255 ] characters

Stable key scoped to authenticated organization and operation.

Request Body schema: application/json
required
hold_id
required
integer (PositiveObjectId) >= 1
external_reference
required
string (ExternalReference) [ 1 .. 255 ] characters
required
object (RateSnapshot)

Responses

Request samples

Content type
application/json
{
  • "hold_id": 1,
  • "external_reference": "string",
  • "rate_snapshot": {
    }
}

Response samples

Content type
application/json
{
  • "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  • "idempotency_key": "string",
  • "organization_id": 1,
  • "booking_id": 1,
  • "trip_id": 1,
  • "external_reference": "string",
  • "status": "CONFIRMED",
  • "code": "BOOKING_CONFIRMED",
  • "inventory_revision": 1,
  • "occurred_at": "2019-08-24T14:15:22Z",
  • "business_timezone": "string"
}

Atomically move a booking to a new resource or interval

Requires Idempotency-Key and returns inventory_revision.

Authorizations:
bearerAuth
path Parameters
id
required
integer >= 1
header Parameters
Idempotency-Key
required
string [ 8 .. 255 ] characters

Stable key scoped to authenticated organization and operation.

Request Body schema: application/json
required
boat_id
required
integer (PositiveObjectId) >= 1
trip_template_id
required
integer (PositiveObjectId) >= 1
starts_at
required
string <date-time>
ends_at
required
string <date-time>

Business interval end; interval semantics are half-open.

external_reference
required
string (ExternalReference) [ 1 .. 255 ] characters

Responses

Request samples

Content type
application/json
{
  • "boat_id": 1,
  • "trip_template_id": 1,
  • "starts_at": "2019-08-24T14:15:22Z",
  • "ends_at": "2019-08-24T14:15:22Z",
  • "external_reference": "string"
}

Response samples

Content type
application/json
{
  • "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  • "idempotency_key": "string",
  • "organization_id": 1,
  • "booking_id": 1,
  • "trip_id": 1,
  • "external_reference": "string",
  • "status": "CONFIRMED",
  • "code": "BOOKING_CONFIRMED",
  • "inventory_revision": 1,
  • "occurred_at": "2019-08-24T14:15:22Z",
  • "business_timezone": "string"
}

Cancel a future booking and release its allocation

Requires Idempotency-Key and returns inventory_revision.

Authorizations:
bearerAuth
path Parameters
id
required
integer >= 1
header Parameters
Idempotency-Key
required
string [ 8 .. 255 ] characters

Stable key scoped to authenticated organization and operation.

Request Body schema: application/json
required
external_reference
required
string (ExternalReference) [ 1 .. 255 ] characters
reason
string or null <= 500 characters

Responses

Request samples

Content type
application/json
{
  • "external_reference": "string",
  • "reason": "string"
}

Response samples

Content type
application/json
{
  • "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  • "idempotency_key": "string",
  • "organization_id": 1,
  • "booking_id": 1,
  • "trip_id": 1,
  • "external_reference": "string",
  • "status": "CONFIRMED",
  • "code": "BOOKING_CONFIRMED",
  • "inventory_revision": 1,
  • "occurred_at": "2019-08-24T14:15:22Z",
  • "business_timezone": "string"
}

Inventory

Monotonic organization inventory revision reads.

Get the authenticated organization's inventory revision

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",
  • "organization_id": 1,
  • "inventory_revision": 0,
  • "occurred_at": "2019-08-24T14:15:22Z",
  • "business_timezone": "string"
}