Read the outcome of a Restriction Batch
/api/v1/restriction-batches/{id}restrictions.writePer Property: changes applied, unchanged, superseded, refused (and why) and failed (and why), as runs of dates. Only batches of the calling App Connection are visible; another one answers not_found.
Parameters
Path parameters
idstring (uuid)required
Responses
200The Restriction Batch and its outcome.
application/jsonRestrictionBatch
idstring (uuid)requiredstatusstringrequiredqueuedthenprocessingwhile changes wait for the Sales Channels (each Property is sent at a pace the Sales Channels accept, and retried when they are unavailable); final:completed(nothing failed),partially_failed,failed(nothing applied),cancelled.One of:
queuedprocessingcompletedpartially_failedfailedcancelledcreated_atstring (date-time)requiredcompleted_atstring (date-time) | nullrequiredpropertiesRestrictionBatchProperty[]requiredShow 5 child attributesHide child attributes
property_idstring (uuid)requiredstatusstringrequiredpending: changes still wait.applied: some changes were applied or already current and none failed (refused, superseded or cancelled ones aside, seechanges).failed: some changes failed, seefailures.refused: every change was refused.superseded: nothing was sent, every change not refused was replaced by a later batch first.cancelled: nothing was sent because the App Connection was revoked or paused by ZenHost, the Property left its Property Access, or the App lostrestrictions.write.One of:
pendingappliedfailedrefusedsupersededcancelledchangesobjectrequiredDate × field changes of this Property, by outcome.
Show 8 child attributesHide child attributes
submittedintegerrequiredpendingintegerrequiredappliedintegerrequiredunchangedintegerrequiredAlready the current value: nothing was sent.
supersededintegerrequiredReplaced by a later batch on the same date and field before being sent; not a failure.
refusedintegerrequiredfailedintegerrequiredcancelledintegerrequiredNot sent: the App Connection was revoked or paused by ZenHost first, the Property left its Property Access, or the App lost
restrictions.write.
refused_fieldsRefusedField[]requiredShow 4 child attributesHide child attributes
fieldstringrequiredOne of:
ratemin_stayclosed_to_arrivalclosed_to_departureavailabilityreasonstringrequiredOne of:
manual_overridemanaged_by_another_pricing_toolblocked_by_linked_propertyfromstring (date)requiredtostring (date)required
failuresRestrictionBatchFailure[]requiredShow 5 child attributesHide child attributes
fieldstringrequiredOne of:
ratemin_stayclosed_to_arrivalclosed_to_departureavailabilitycodestringrequiredsales_channel_rejected: the Sales Channels refused the change.sales_channel_unavailable: the Sales Channels could not be reached, after retries spread over about 15 minutes.sales_channel_mapping_missing: the Property is not fully connected to its Sales Channels.property_not_configured: the Property has no primary rate plan or room in ZenHost.not_in_calendar: ZenHost holds no Restriction for that date.property_not_found: the Property no longer exists.write_failed: ZenHost could not store the change. New codes may be added.One of:
sales_channel_rejectedsales_channel_unavailablesales_channel_mapping_missingproperty_not_configurednot_in_calendarproperty_not_foundwrite_failedmessagestringrequiredfromstring (date)requiredtostring (date)required
401Error code: unauthorized, connection_revoked.
Error codes
unauthorizedThe access token is missing, unknown, expired or revoked, or was issued before the account connected the App again. Refresh it; if refreshing fails, ask the owner to connect again.connection_revokedThe owner revoked the App Connection (or your App revoked its own refresh token). Stop calling for this account and drop its tokens.
402Error code: subscription_blocked.
Error codes
subscription_blockedThe ZenHost subscription of the account is blocked (unpaid, cancelled…). The connection is kept: tell your customer, calls work again once the subscription is restored.
403Error code: app_suspended, forbidden_permission.
Error codes
app_suspendedZenHost suspended your App, or no longer allows it on this account. Stop calling and contact ZenHost.forbidden_permissionYour App was not granted the Permission this endpoint requires.
404Error code: not_found.
Error codes
not_foundThe resource does not exist or is outside the Connection Scope (both look the same), or the path is not an endpoint of/api/v1.
429Error code: rate_limited.
Header Retry-After — Seconds to wait before the next call is allowed. Limits per App Connection: 60 reads (GET), 10 writes (other POST) and 30 messages sent to guests per minute.
Error codes
rate_limitedToo many calls on this App Connection. Wait for the number of seconds inRetry-After.
500Error code: internal_error.
Error codes
internal_errorZenHost failed to answer. Retry later with a back-off.