Menu/restriction-batches/{id}

Read the outcome of a Restriction Batch

GET/api/v1/restriction-batches/{id}
Nécessite restrictions.write

Per 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)obligatoire
  • statusstringobligatoire

    queued then processing while 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 : queued processing completed partially_failed failed cancelled

  • created_atstring (date-time)obligatoire
  • completed_atstring (date-time) | nullobligatoire
  • propertiesRestrictionBatchProperty[]obligatoire
    Afficher 5 attributs enfants
    • property_idstring (uuid)obligatoire
    • statusstringobligatoire

      pending: changes still wait. applied: some changes were applied or already current and none failed (refused, superseded or cancelled ones aside, see changes). failed: some changes failed, see failures. 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 lost restrictions.write.

      Parmi : pending applied failed refused superseded cancelled

    • changesobjectobligatoire

      Date × field changes of this Property, by outcome.

      Afficher 8 attributs enfants
      • submittedintegerobligatoire
      • pendingintegerobligatoire
      • appliedintegerobligatoire
      • unchangedintegerobligatoire

        Already the current value: nothing was sent.

      • supersededintegerobligatoire

        Replaced by a later batch on the same date and field before being sent; not a failure.

      • refusedintegerobligatoire
      • failedintegerobligatoire
      • cancelledintegerobligatoire

        Not 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[]obligatoire
      Afficher 4 attributs enfants
      • fieldstringobligatoire

        Parmi : rate min_stay closed_to_arrival closed_to_departure availability

      • reasonstringobligatoire

        Parmi : manual_override managed_by_another_pricing_tool blocked_by_linked_property

      • fromstring (date)obligatoire
      • tostring (date)obligatoire
    • failuresRestrictionBatchFailure[]obligatoire
      Afficher 5 attributs enfants
      • fieldstringobligatoire

        Parmi : rate min_stay closed_to_arrival closed_to_departure availability

      • codestringobligatoire

        sales_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_rejected sales_channel_unavailable sales_channel_mapping_missing property_not_configured not_in_calendar property_not_found write_failed

      • messagestringobligatoire
      • fromstring (date)obligatoire
      • tostring (date)obligatoire
401Error code: unauthorized, connection_revoked.

Codes d’erreur

  • unauthorized Le 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_revoked Le 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_blocked L’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_suspended ZenHost a suspendu votre App, ou ne l’autorise plus sur ce compte. Cessez les appels et contactez ZenHost.
  • forbidden_permission Votre App n’a pas reçu la permission que cet endpoint exige.
404Error code: not_found.

Codes d’erreur

  • not_found La 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_limited Trop d’appels sur cette connexion d’App. Attendez le nombre de secondes indiqué dans Retry-After.
500Error code: internal_error.

Codes d’erreur

  • internal_error ZenHost n’a pas pu répondre. Réessayez plus tard avec un délai croissant.

Tous les codes d’erreur et la conduite à tenir