Record an arrival or departure (hauled_out and launched are accepted for M9) (presence.write)
curl --request POST \ --url https://example.com/api/admin/v1/marinas/example/presences \ --header 'Content-Type: application/json' \ --header 'X-CSRF-Token: <X-CSRF-Token>' \ --cookie porto_session=<porto_session> \ --data '{ "vessel_id": "example", "event": "arrived", "at": "2026-04-15T12:00:00Z", "allocation_id": "example", "expected_resource_id": "example", "notes": "example", "expected_return_on": "2026-04-15" }'Offline replay (M6b, Porto-Offline-Queued-At): only arrived / departed with allocation_id and
expected_resource_id (else 422 offline_not_allowed); at defaults to the queued instant. With
expected_resource_id the allocation must still be active, of the vessel and on that resource for the night, else 409
allocation_changed with details.current_resource_id / details.current_resource_code (null when the
allocation is gone). A key replayed with the same body returns the same presence, also after the
idempotency row is gone (domain dedupe).
Authorizations
Sezione intitolata “Authorizations”Parameters
Sezione intitolata “Parameters”Path Parameters
Sezione intitolata “Path Parameters”Header Parameters
Sezione intitolata “Header Parameters”8 to 128 characters of [A-Za-z0-9_-:.]; the response is replayed for 24 hours, 7 days for offline operations (x-porto-offline).
Enqueue instant of a replay from the offline queue (M6b): RFC 3339, not after now + 10 minutes, together with Idempotency-Key (else 422 validation_failed); recorded in the audit rows as offline_queued_at. Refused with 422 offline_not_allowed on operations without x-porto-offline.
Request Bodyrequired
Sezione intitolata “Request Bodyrequired”object
The resource the operator saw for the allocation (M6b, with allocation_id): a different current resource is 409 allocation_changed.
Calendar date YYYY-MM-DD in the marina timezone
Responses
Sezione intitolata “Responses”Created
object
object
The vessel embedded in occupancy and contract views (no registration, no owner)
object
Length in integer centimetres
Length in integer centimetres
Length in integer centimetres
Calendar date YYYY-MM-DD in the marina timezone
Only with customers.read
A mooring contract or a transit
object
ORM-2026-0001, TRN-2026-0001
Mooring statuses (draft..suspended) and transit statuses (held..awaiting_approval)
The customer embedded in views; display_name only with customers.read
object
The customer embedded in views; display_name only with customers.read
object
The vessel embedded in occupancy and contract views (no registration, no owner)
object
Length in integer centimetres
Length in integer centimetres
Length in integer centimetres
Calendar date YYYY-MM-DD in the marina timezone
Calendar date YYYY-MM-DD in the marina timezone
Amount in integer cents of the marina currency
Amount in integer cents of the marina currency
object
object
object
Calendar date YYYY-MM-DD in the marina timezone
Exclusive; may be after the departure (best_combination overshoot)
Hour, half_day and day (and week) are accepted only on flat base rules of items with revenue class rental (M11, priced by RentalQuote, ignored by the mooring engine)
object
object
Calendar date YYYY-MM-DD in the marina timezone
Last night (inclusive)
object
object
Trace code (pricing/trace.go), shown as pricingEnums:trace.
object
What the simulator used after resolving ids; never names or contact data.
object
Calendar date YYYY-MM-DD in the marina timezone
Versioned contract policy (m3-plan §4.7); unknown keys are rejected
object
V1 rows are read as v2 with the defaults (M4)
object
object
object
MM-DD (rolled into the contract period) or YYYY-MM-DD
object
object
Local time HH:MM in the marina timezone
Local time HH:MM in the marina timezone
Only with contracts.write or transits.desk
Calendar date YYYY-MM-DD in the marina timezone
Refund (negative) or penalty (positive) from the cancellation policy; charged in M5
object
object
Calendar date YYYY-MM-DD in the marina timezone
Calendar date YYYY-MM-DD in the marina timezone
The open renewal proposal of this contract
object
Quantity in thousandths (1.5 = 1500)
Amount in integer cents of the marina currency
object
Length in integer centimetres
Length in integer centimetres
Angle in tenths of a degree, 0 = +x, 900 = +y (y down, clockwise on screen)
Calendar date YYYY-MM-DD in the marina timezone
Calendar date YYYY-MM-DD in the marina timezone
object
Inclusive range of nights
object
Calendar date YYYY-MM-DD in the marina timezone
Calendar date YYYY-MM-DD in the marina timezone
object
Calendar date YYYY-MM-DD in the marina timezone
Calendar date YYYY-MM-DD in the marina timezone
Amount in integer cents of the marina currency
Only with customers.read
object
The vessel embedded in occupancy and contract views (no registration, no owner)
object
Length in integer centimetres
Length in integer centimetres
Length in integer centimetres
Calendar date YYYY-MM-DD in the marina timezone
Only with customers.read
Example
{ "presence": { "vessel": { "hull_type": "monohull_motor" }, "event": "arrived", "source": "staff" }, "contract": { "kind": "mooring", "term": "annual", "status": "draft", "vessel": { "hull_type": "monohull_motor" }, "channel": "desk", "breakdown": { "contract_type": "annual", "lines": [ { "kind": "berth", "item_type": "berth_fee", "blocks": [ { "unit": "night" } ] } ], "resolved": { "hull_type": "monohull_motor", "customer_category": "member", "channel": "desk", "dimension_origin": "declared" } }, "policy": { "version": 1, "release_policy": "never", "payment": { "schedule": { "mode": "fixed_dates" }, "rounding_unit_cents": 1 }, "cancellation": { "refund": "pro_rata" } }, "confirmation_source": "manual", "charter": { "pricing_mode": "per_berth" }, "warnings": [ "insurance_missing" ], "lines": [ { "line_kind": "resource", "resource_type": "berth" } ], "allocations": [ { "resource_type": "berth", "kind": "hold", "status": "active" } ], "releases": [ { "resource_type": "berth", "status": "active", "source": "customer_phone" } ], "presences": [ { "vessel": { "hull_type": "monohull_motor" }, "event": "arrived", "source": "staff" } ] }}Malformed request or validation failure
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Not authenticated, or invalid credentials
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Authenticated but not allowed
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Not found (or not visible to the principal)
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Conflict with the current state
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Idempotency-Key reused with a different request
object
object
Map validation issues (map_invalid)
object
ValidateMap rule (m1-plan §2.3), e.g. berth_overlap
Numbers only (cm, counts)
object
Price list validation issues (price_list_invalid)
object
Pricing.Validate issue code (m2-plan §4.8), e.g. period_overlap
object
Id of the row, or the client key of an unsaved one
Codes and integers as strings; never personal data
object
Machine-readable details: no_price {item_id, contract_type, night, unit, category, band, reason}; price_list_overlap {conflicts: [{id, code, valid_from, valid_to}]}; in_use {references}; resource_taken ConflictDetail; fit_blocked FitResult; placement_invalid {reason, allocation_id?}; invalid_transition {from, action}; closure_active {closure_id, from_date, to_date}; release_invalid {reason}; allocation_changed {current_resource_id, current_resource_code} (null when the allocation is gone); remote_pin_mismatch {expected_fingerprint, presented_fingerprint}; scenario_conflicts {conflicts: [StorageScenarioConflict]}; maintenance_conflicts {conflicts: [MaintenanceConflict]}; storage_no_space {area_id, from, to}. Ids, codes, dates and integers only.
object
Example
{ "type": "bad_request", "issues": [ { "severity": "error" } ], "price_list_issues": [ { "severity": "error", "ref": { "kind": "list" } } ]}Porto è sviluppato da Coste360 SRL. Codice sorgente disponibile con licenza BSL 1.1; il marchio Porto è escluso dalla licenza.