Cancel within the policy; 409 refund_changed when the refund differs from the previewed one
curl --request POST \ --url https://example.com/api/public/v1/example/account/bookings/example/cancel \ --header 'Content-Type: application/json' \ --data '{ "expected_refund_cents": 1 }'Parameters
Sezione intitolata “Parameters”Path Parameters
Sezione intitolata “Path Parameters”Header Parameters
Sezione intitolata “Header Parameters”Customer-area session token (openAccountSession); missing or invalid = 404 on account operations
8 to 128 characters of [A-Za-z0-9_-:.]; the response is replayed for 24 hours, 7 days for offline operations (x-porto-offline).
Request Bodyrequired
Sezione intitolata “Request Bodyrequired”object
Example generated
{ "expected_refund_cents": 1}Responses
Sezione intitolata “Responses”Cancelled
object
Transit statuses an online or channel booking goes through
Example
{ "status": "held", "refund_as": "refund"}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 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" } } ]}A booking rule refused the request (m8-plan §11: booking_rules with the field and code, consent_required, cancellation_not_allowed, nothing_due, idempotency_mismatch, provider_disabled, fit_blocked), or a 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" } } ]}Rate limited (see Retry-After)
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" } } ]}Headers
Sezione intitolata “Headers”Porto è sviluppato da Coste360 SRL. Codice sorgente disponibile con licenza BSL 1.1; il marchio Porto è escluso dalla licenza.