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.
Paramètres
Paramètres de chemin
idstring (uuid)obligatoire
Réponses
200The Restriction Batch and its outcome.
application/jsonRestrictionBatch
idstring (uuid)obligatoirestatusstringobligatoirequeuedthenprocessingwhile 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.Parmi :
queuedprocessingcompletedpartially_failedfailedcancelledcreated_atstring (date-time)obligatoirecompleted_atstring (date-time) | nullobligatoirepropertiesRestrictionBatchProperty[]obligatoireAfficher 5 attributs enfantsMasquer les attributs enfants
property_idstring (uuid)obligatoirestatusstringobligatoirepending: 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.Parmi :
pendingappliedfailedrefusedsupersededcancelledchangesobjectobligatoireDate × field changes of this Property, by outcome.
Afficher 8 attributs enfantsMasquer les attributs enfants
submittedintegerobligatoirependingintegerobligatoireappliedintegerobligatoireunchangedintegerobligatoireAlready the current value: nothing was sent.
supersededintegerobligatoireReplaced by a later batch on the same date and field before being sent; not a failure.
refusedintegerobligatoirefailedintegerobligatoirecancelledintegerobligatoireNot 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[]obligatoireAfficher 4 attributs enfantsMasquer les attributs enfants
fieldstringobligatoireParmi :
ratemin_stayclosed_to_arrivalclosed_to_departureavailabilityreasonstringobligatoireParmi :
manual_overridemanaged_by_another_pricing_toolblocked_by_linked_propertyfromstring (date)obligatoiretostring (date)obligatoire
failuresRestrictionBatchFailure[]obligatoireAfficher 5 attributs enfantsMasquer les attributs enfants
fieldstringobligatoireParmi :
ratemin_stayclosed_to_arrivalclosed_to_departureavailabilitycodestringobligatoiresales_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.Parmi :
sales_channel_rejectedsales_channel_unavailablesales_channel_mapping_missingproperty_not_configurednot_in_calendarproperty_not_foundwrite_failedmessagestringobligatoirefromstring (date)obligatoiretostring (date)obligatoire
401Error code: unauthorized, connection_revoked.
Codes d’erreur
unauthorizedLe jeton d’accès est absent, inconnu, expiré ou révoqué, ou a été émis avant que le compte ne reconnecte l’App. Rafraîchissez-le ; si le rafraîchissement échoue, demandez au propriétaire de reconnecter l’App.connection_revokedLe propriétaire a révoqué la connexion d’App (ou votre App a révoqué son propre jeton de rafraîchissement). Cessez les appels pour ce compte et supprimez ses jetons.
402Error code: subscription_blocked.
Codes d’erreur
subscription_blockedL’abonnement ZenHost du compte est bloqué (impayé, résilié…). La connexion est conservée : prévenez votre client, les appels refonctionnent dès que l’abonnement est rétabli.
403Error code: app_suspended, forbidden_permission.
Codes d’erreur
app_suspendedZenHost a suspendu votre App, ou ne l’autorise plus sur ce compte. Cessez les appels et contactez ZenHost.forbidden_permissionVotre App n’a pas reçu la permission que cet endpoint exige.
404Error code: not_found.
Codes d’erreur
not_foundLa ressource n’existe pas ou est hors du périmètre de connexion (les deux cas sont indiscernables), ou le chemin n’est pas un endpoint de/api/v1.
429Error code: rate_limited.
En-tête 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.
Codes d’erreur
rate_limitedTrop d’appels sur cette connexion d’App. Attendez le nombre de secondes indiqué dansRetry-After.
500Error code: internal_error.
Codes d’erreur
internal_errorZenHost n’a pas pu répondre. Réessayez plus tard avec un délai croissant.