Skip to main content

Create or replace LOS data for an apartment

PUT 

/:apartmentId/los

Operation ID: upsertLos

Holidu calls this endpoint to push the complete LOS data for an apartment to the affiliate.

This is an idempotent upsert (RFC 9110 §9.3.4):

  • If the affiliate does not yet have LOS data for this apartment, it should store the payload and respond with 201 Created.
  • If LOS data already exists, the affiliate should fully replace it with the provided payload and respond with 204 No Content.

The request body always contains the complete LOS dataset for the apartment. Any check-in dates the affiliate previously stored but that are absent from this payload are no longer valid and must be removed.

An empty los map ({}) means no pricing is available for the apartment — the affiliate should remove all stored LOS data for it.

Authentication​

Holidu authenticates to the affiliate using an OAuth 2.0 Bearer Token (RFC 6750).

PropertyValue
Typehttp
Schemebearer
Bearer formatJWT

Token exchange details are agreed upon during onboarding.

Request body examples​

Multiple check-in dates with tiered pricing:

{
"los": {
"2024-06-01": [
{ "currency": "EUR", "guests": 2, "price": [0, 0, 300.00, 400.00, 500.00] },
{ "currency": "EUR", "guests": 4, "price": [0, 0, 350.00, 460.00, 580.00] }
],
"2024-06-02": [
{ "currency": "EUR", "guests": 2, "price": [0, 150.00, 280.00] }
]
}
}

Single check-in date with one pricing tier:

{
"los": {
"2024-06-01": [
{ "currency": "EUR", "guests": 2, "price": [0, 0, 300.00, 400.00, 500.00] }
]
}
}

Empty LOS (no pricing available / fully booked):

{ "los": {} }

Request​

Responses​

LOS data created (first push for this apartment) (RFC 9110 §15.3.2). The Location header contains the canonical URI of the new resource (RFC 9110 §10.2.2).

Response Headers
    Location

    URI of the newly created resource (RFC 9110 §10.2.2).

    Example: /apt-12345/los