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).
| Property | Value |
|---|---|
| Type | http |
| Scheme | bearer |
| Bearer format | JWT |
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
- 201
- 204
- 400
- 401
- 404
- 413
- 429
- 500
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
LOS data replaced successfully — no response body (RFC 9110 §15.3.5).
The request is syntactically invalid (malformed JSON, wrong types, etc.) (RFC 9110 §15.5.1).
Authentication credentials are missing or invalid (RFC 9110 §15.5.2). The affiliate should return a WWW-Authenticate header indicating the expected scheme (RFC 9110 §11.6.1).
Response Headers
Authentication scheme expected by the affiliate.
Bearer realm="affiliate-api"The affiliate does not recognise the apartment ID (RFC 9110 §15.5.5). This may indicate a mapping or onboarding issue that Holidu should investigate.
The request body exceeds the affiliate's maximum accepted size (RFC 9110 §15.5.14).
The affiliate is rate-limiting Holidu (RFC 6585 §4). Holidu will respect the Retry-After header before retrying.
Response Headers
Indicates how long Holidu should wait before retrying (RFC 9110 §10.2.3). Value is either a number of seconds or an HTTP-date.
60An unexpected error on the affiliate's side (RFC 9110 §15.6.1).