Integrations & scripts

Atrium

Hotel plan and subscription API

The internal API linking Atrium to the VulCode client panel: the panel reads a hotel's state, sets its plan and suspends it with a stated reason. The hotel pays in the panel, and Atrium applies what comes from there.

Atrium

About the project

The Atrium integration with the VulCode client panel is an internal API through which the panel runs a hotel's subscription: state, plan and suspension. The hotel pays in that panel, so it cannot change the plan in its own settings. A hotel on a smaller plan or suspended loses no data: it all stays readable and exportable, and only adding and saving is held back. A secret shared by the two services guards access, and with none configured the API answers 503 instead of running unauthenticated.

The challenge

The plan and the suspension have to come from the VulCode client panel, where the hotel pays, not from settings the client can change on their own. The channel between the two services must also never open by mistake when the secret is missing on the server, and a suspended hotel must not lose access to its own data.

What we did

  1. 01

    Reading a hotel's state, setting the plan and suspending it through three API calls

  2. 02

    A free or pro plan, with a paid plan always carrying the end of the paid period

  3. 03

    A return to the free plan on the next request once the period ends, with no scheduler

  4. 04

    Nothing disappears on a smaller plan: a hotel over a limit keeps everything and only stops adding more

  5. 05

    A suspended hotel stays fully readable and exportable, and every write is answered with 402

  6. 06

    A shared secret in a request header and every change in the hotel's activity log under the name VulCode

Related projects

Describe your project.

A free quote comes back within an hour during working hours.

Tell us what you want to build.

A free quote comes back within an hour during working hours. You talk to the person who writes the code.