{"openapi":"3.0.3","info":{"title":"Affiliate API","version":"1.1.0"},"servers":[{"url":"https://external-api.holidu.com"}],"paths":{"/search":{"post":{"operationId":"search","summary":"Search for offers based on the provided criteria","description":"Retrieve a paginated list of offers matching specified filtering criteria, ranked by relevance. If dates are provided, only available offers for those dates are returned with exact pricing. Each offer includes basic property information.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pageIndex":{"type":"integer","minimum":0,"maximum":10000,"description":"Zero-based page index"},"pageSize":{"type":"integer","minimum":1,"maximum":50,"description":"Number of results per page"},"searchTerm":{"type":"string"},"locationBoundingBox":{"type":"object","properties":{"neLat":{"type":"number","minimum":-90,"maximum":90},"neLng":{"type":"number","minimum":-180,"maximum":180},"swLat":{"type":"number","minimum":-90,"maximum":90},"swLng":{"type":"number","minimum":-180,"maximum":180}},"required":["neLat","neLng","swLat","swLng"],"additionalProperties":false,"description":"Bounding box of the search location. Overrides the searchTerm parameter"},"checkin":{"type":"string","format":"date","description":"Check-in date in ISO format YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Check-out date in ISO format YYYY-MM-DD"},"adults":{"type":"integer","minimum":1,"maximum":50,"description":"Number of adult guests"},"children":{"type":"integer","minimum":0,"maximum":50,"description":"Number of child guests"},"childrenAges":{"type":"array","items":{"type":"integer","minimum":0,"maximum":17},"minItems":1,"maxItems":50,"description":"Ages of child guests, defaults to 10 if not specified"},"bedrooms":{"type":"integer","minimum":1,"description":"Number of bedrooms"},"locale":{"type":"string","pattern":"^[a-z]{2}-[A-Z]{2}$","description":"Locale code in format ISO 639-1 + ISO 3166-1 alpha-2, e.g. \"en-US\""},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"Currency code in ISO 4217 format, e.g. \"USD\""},"propertyTypes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"description":"List of property types"},"propertyIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"minItems":1,"maxItems":50,"description":"List of property IDs to search for specifically (max 50)"},"facilities":{"type":"array","items":{"type":"string"},"description":"List of facilities"},"extras":{"type":"array","items":{"type":"string","enum":["description","photos","facilities"]},"description":"Extra fields to include in the response. Supported values: description, photos, facilities"},"salesChannelId":{"type":"string","minLength":1,"maxLength":80,"description":"Only for special cases, consult Holidu"},"domainId":{"type":"integer","minimum":1,"maximum":99999,"description":"Only for special cases, consult Holidu"}},"required":["adults","children","locale","currency"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"metadata":{"type":"object","properties":{"totalCount":{"type":"integer","description":"Total number of results matching the search criteria"}},"required":["totalCount"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"description":"Short text description of the offer"},"photos":{"type":"array","items":{"type":"object","properties":{"thumbnail":{"type":"string","format":"uri"},"medium":{"type":"string","format":"uri"},"large":{"type":"string","format":"uri"}},"required":["thumbnail","medium","large"],"additionalProperties":false},"nullable":true},"url":{"type":"string"},"area":{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","enum":["UNIT_SM","UNIT_SF"],"description":"Unit of the area. Either UNIT_SM (square meters) of UNIT_SF (square feet)"}},"required":["value","unit"],"additionalProperties":false,"nullable":true},"bedroomCount":{"type":"integer","nullable":true},"bathroomCount":{"type":"integer","nullable":true},"guestCount":{"type":"integer","description":"Number of guests the offer can accommodate"},"title":{"type":"string"},"propertyType":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","minLength":1,"maxLength":80}},"required":["id","title"],"additionalProperties":false},"facilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","minLength":2,"maxLength":80},"group":{"type":"string"}},"required":["id","title","group"],"additionalProperties":false},"nullable":true},"petsAllowed":{"type":"boolean"},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":350},"distance":{"type":"string","nullable":true,"description":"Distance in meters to the center of search region if specified, otherwise null"},"postalCode":{"type":"string","nullable":true,"description":"Postal code, can be null if not shared by the provider"},"city":{"type":"string","nullable":true,"description":"City name, can be null if not shared by the provider"},"coordinates":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},"required":["name","distance","postalCode","city","coordinates"],"additionalProperties":false,"nullable":true},"price":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","description":"Currency code in ISO 4217 format, e.g. \"USD\""},"daily":{"type":"number"},"total":{"type":"number"},"nights":{"type":"integer"},"discountAmount":{"type":"number","minimum":0,"nullable":true,"description":"Absolute discount amount in given currency"},"discountPercentage":{"type":"number","nullable":true},"totalBeforeDiscount":{"type":"number","nullable":true},"dailyBeforeDiscount":{"type":"number","nullable":true}},"required":["currency","daily","total","nights","discountAmount","discountPercentage","totalBeforeDiscount","dailyBeforeDiscount"],"additionalProperties":false,"description":"Price information for the offer for a given travel dates"},{"type":"object","properties":{"currency":{"type":"string","description":"Currency code in ISO 4217 format, e.g. \"USD\""},"daily":{"type":"number"}},"required":["currency","daily"],"additionalProperties":false,"description":"Minimal daily price for a property, doesn't depend on travel dates"}],"description":"Price information for the offer, either for a given travel dates or as a starting price"},"cancellationPolicy":{"type":"object","properties":{"type":{"type":"string","enum":["FREE_CANCELLATION","LIGHT_CANCELLATION"]}},"required":["type"],"additionalProperties":false,"nullable":true},"rating":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":10},"count":{"type":"integer","minimum":0}},"required":["value","count"],"additionalProperties":false,"nullable":true},"licenseId":{"type":"string","nullable":true}},"required":["id","description","photos","url","area","bedroomCount","bathroomCount","guestCount","title","propertyType","facilities","petsAllowed","location","price","cancellationPolicy","rating","licenseId"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"apartmentId":{"type":"string"},"code":{"type":"number"},"message":{"type":"string"}},"required":["apartmentId","code","message"],"additionalProperties":false}}},"required":["metadata","items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/details":{"post":{"operationId":"details","summary":"Get detailed information about the provided offers","description":"Retrieve detailed static information for specified offers. The \"extras\" parameter allows for the inclusion of additional data points to the response. The response includes an RFC 6570-compatible \"urlTemplate\" for generating checkout page links with check-in and check-out dates. If some requested offers cannot be retrieved, these will be reported in the \"errors\" array, with the corresponding property identifier, error code, and descriptive message.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"propertyIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"minItems":1,"maxItems":50,"description":"List of property IDs"},"locale":{"type":"string","pattern":"^[a-z]{2}-[A-Z]{2}$","description":"Locale code in format ISO 639-1 + ISO 3166-1 alpha-2, e.g. \"en-US\""},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"Currency code in ISO 4217 format, e.g. \"USD\""},"extras":{"type":"array","items":{"type":"string","enum":["description","photos","facilities","rooms","reviews","guestCardsAndCertificates"]},"description":"Extra fields to include in the response. Supported values: description, photos, facilities, rooms, reviews, guestCardsAndCertificates."},"domainId":{"type":"number","description":"Only for special cases, consult Holidu"},"salesChannelId":{"type":"string","description":"Sales channel identifier, required for filtering by sales channel"}},"required":["propertyIds","locale","currency"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"description":{"type":"string","nullable":true,"description":"Short text description of the offer"},"photos":{"type":"array","items":{"type":"object","properties":{"thumbnail":{"type":"string","format":"uri"},"medium":{"type":"string","format":"uri"},"large":{"type":"string","format":"uri"}},"required":["thumbnail","medium","large"],"additionalProperties":false},"nullable":true},"urlTemplate":{"type":"string","description":"RFC 6570 URI template to generate checkout page link with check-in, check-out and guest information. Date placeholders must be in ISO 8601 format."},"area":{"type":"object","properties":{"value":{"type":"number","minimum":0},"unit":{"type":"string","enum":["UNIT_SM","UNIT_SF"],"description":"Unit of the area. Either UNIT_SM (square meters) of UNIT_SF (square feet)"}},"required":["value","unit"],"additionalProperties":false,"nullable":true},"bedrooms":{"type":"integer","nullable":true},"bathrooms":{"type":"integer","nullable":true},"guests":{"type":"integer","minimum":1},"title":{"type":"string","minLength":2,"maxLength":250},"propertyType":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","maxLength":250,"nullable":true}},"required":["id","title"],"additionalProperties":false},"facilities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string","minLength":2,"maxLength":80},"group":{"type":"string"}},"required":["id","title","group"],"additionalProperties":false},"nullable":true},"guestCardsAndCertificates":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"name":{"type":"string"}},"required":["title","name"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false,"nullable":true},"petsAllowed":{"type":"boolean","nullable":true},"location":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":350},"postalCode":{"type":"string","nullable":true,"description":"Postal code, can be null if not shared by the provider"},"city":{"type":"string","nullable":true,"description":"City name, can be null if not shared by the provider"},"coordinates":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lng":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lng"],"additionalProperties":false}},"required":["name","postalCode","city","coordinates"],"additionalProperties":false,"nullable":true},"cancellationPolicy":{"type":"object","properties":{"type":{"type":"string","enum":["FREE_CANCELLATION","LIGHT_CANCELLATION"]}},"required":["type"],"additionalProperties":false,"nullable":true},"rating":{"type":"object","properties":{"value":{"type":"number","minimum":0,"maximum":10},"count":{"type":"integer","minimum":0}},"required":["value","count"],"additionalProperties":false,"nullable":true},"rooms":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["BEDROOM","LIVING_ROOM","BATHROOM","KITCHEN"]}},"required":["type"],"additionalProperties":false},"nullable":true},"rules":{"enum":["null"],"nullable":true,"description":"TODO: implement rules schema"},"pois":{"enum":["null"],"nullable":true,"description":"TODO: implement pois schema"},"reviews":{"type":"object","properties":{"averageRatings":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"rating":{"type":"number"}},"required":["category","rating"],"additionalProperties":false}},"reviewDetails":{"type":"array","items":{"type":"object","properties":{"publishedAt":{"type":"string"},"comment":{"type":"string"},"language":{"type":"string"}},"required":["publishedAt","comment","language"],"additionalProperties":false}}},"required":["averageRatings","reviewDetails"],"additionalProperties":false,"nullable":true},"price":{"type":"object","properties":{"currency":{"type":"string","description":"Currency code in ISO 4217 format, e.g. \"USD\""},"daily":{"type":"number"}},"required":["currency","daily"],"additionalProperties":false,"description":"Minimal daily price for a property, doesn't depend on travel dates"},"instantBookable":{"type":"boolean"}},"required":["id","description","urlTemplate","area","bedrooms","bathrooms","guests","title","propertyType","petsAllowed","location","cancellationPolicy","rating","rooms","rules","pois","reviews","price","instantBookable"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"propertyId":{"type":"string"},"code":{"type":"number"},"message":{"type":"string"}},"required":["propertyId","code","message"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/availabilities":{"post":{"operationId":"availabilities","summary":"Get information about the availability of given offers","description":"Retrieve real-time prices and availability for specified properties on given dates.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"propertyIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":80},"minItems":1,"maxItems":200,"description":"List of property IDs"},"checkin":{"type":"string","format":"date","description":"Check-in date in ISO format YYYY-MM-DD"},"checkout":{"type":"string","format":"date","description":"Check-out date in ISO format YYYY-MM-DD"},"adults":{"type":"integer","minimum":1,"maximum":50,"description":"Number of adult guests"},"children":{"type":"integer","minimum":0,"maximum":50,"description":"Number of child guests"},"childrenAges":{"type":"array","items":{"type":"integer","minimum":0},"maxItems":50,"description":"Ages of child guests"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"Currency code in ISO 4217 format, e.g. \"USD\""},"salesChannelId":{"type":"string","minLength":1,"maxLength":80,"description":"Only for special cases, consult Holidu"},"locale":{"type":"string","pattern":"^[a-z]{2}-[A-Z]{2}$","description":"Locale code in format ISO 639-1 + ISO 3166-1 alpha-2, e.g. \"en-US\""},"country":{"type":"string","pattern":"^[A-Z]{2}$","description":"Country code in ISO 3166-1 alpha-2 format"},"domainId":{"type":"integer","description":"Only for special cases, consult Holidu"},"brand":{"type":"string","description":"Only for special cases, consult Holidu"},"deviceType":{"type":"string","enum":["DESKTOP","MOBILE"],"description":"Device type, either \"DESKTOP\" or \"MOBILE\""}},"required":["propertyIds","checkin","checkout","adults","children","currency","locale","country"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"propertyId":{"type":"string","minLength":1},"isAvailable":{"type":"boolean"},"price":{"type":"object","properties":{"currency":{"type":"string","description":"Currency code in ISO 4217 format, e.g. \"USD\""},"daily":{"type":"number"},"total":{"type":"number"},"nights":{"type":"integer"},"discountAmount":{"type":"number","minimum":0,"nullable":true,"description":"Absolute discount amount in given currency"},"discountPercentage":{"type":"number","nullable":true},"totalBeforeDiscount":{"type":"number","nullable":true},"dailyBeforeDiscount":{"type":"number","nullable":true}},"required":["currency","daily","total","nights","discountAmount","discountPercentage","totalBeforeDiscount","dailyBeforeDiscount"],"additionalProperties":false,"description":"Price for the given dates. Null if property is not available for the given dates.","nullable":true},"cancellationPolicy":{"type":"object","properties":{"cancellationFees":{"type":"array","items":{"type":"object","properties":{"daysBeforeArrival":{"type":"integer","nullable":true,"description":"Number of days before arrival from which this fee applies"},"free":{"type":"boolean","description":"Whether cancellation is free under this fee rule"},"percentage":{"type":"number","nullable":true,"description":"Percentage of the total price charged as a cancellation fee"},"amount":{"type":"number","nullable":true,"description":"Fixed amount charged as a cancellation fee"},"currency":{"type":"string","nullable":true,"description":"Currency code for the fixed cancellation fee amount"}},"required":["free"],"additionalProperties":false}}},"required":["cancellationFees"],"additionalProperties":false,"nullable":true,"description":"Cancellation policy for the property. Null if not available."}},"required":["propertyId","isAvailable","price","cancellationPolicy"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Property ID for which the error occurred"},"errorType":{"type":"string","description":"Type of error that occurred"}},"required":["id","errorType"],"additionalProperties":false},"description":"List of errors for properties that could not be fetched"}},"required":["items"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/changed":{"post":{"operationId":"changed","summary":"Get a list of property IDs that have changed within the specified time window.","description":"Returns property IDs with data potentially updated within the specified time range. The inventory is continuously refreshed, with more frequent updates for recent days.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"changedSince":{"type":"string","format":"date-time","description":"Start of the time window (inclusive) in ISO-8601 format from which property changes are returned, e.g. 2024-10-01T14:48:00.000Z"},"changedUntil":{"type":"string","format":"date-time","description":"End of the time window (inclusive) in ISO-8601 format until which property changes are returned, e.g. 2024-10-01T16:00:00.000Z"},"domainId":{"type":"integer","minimum":1,"description":"Controls visibility of inventory, you should get the value from your TAM"},"salesChannelId":{"type":"string","minLength":1,"description":"Sales channel identifier, consult Holidu for the correct value"},"changeDetectionMode":{"type":"string","enum":["DOCUMENT_REFRESH","DOCUMENT_CHANGE"],"description":"Controls what triggers a change event. DOCUMENT_REFRESH includes any re-indexing, DOCUMENT_CHANGE only includes actual data changes. Defaults to DOCUMENT_REFRESH"}},"required":["changedSince","domainId"],"additionalProperties":false}}}},"parameters":[],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"changedPropertyIds":{"type":"array","items":{"type":"string"},"description":"List of property IDs with data updated within the specified time window."}},"required":["changedPropertyIds"],"additionalProperties":false}}}},"default":{"$ref":"#/components/responses/error"}}}},"/{apartmentId}/los":{"parameters":[{"$ref":"#/components/parameters/ApartmentId"}],"put":{"operationId":"upsertLos","tags":["LOS Push API"],"summary":"Create or replace LOS data for an apartment","servers":[{"url":"https://{affiliateHost}/holidu/v1/apartments","description":"Affiliate provider endpoint (base URL agreed upon during onboarding).","variables":{"affiliateHost":{"default":"api.affiliate-example.com","description":"The affiliate's API hostname."}}}],"description":"Holidu calls this endpoint to push the complete LOS data for an apartment to the affiliate.\n\nThis is an idempotent upsert ([RFC 9110 §9.3.4](https://www.rfc-editor.org/rfc/rfc9110#section-9.3.4)):\n- If the affiliate does not yet have LOS data for this apartment, it should store the payload and respond with `201 Created`.\n- If LOS data already exists, the affiliate should **fully replace** it with the provided payload and respond with `204 No Content`.\n\nThe 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.\n\nAn empty `los` map (`{}`) means no pricing is available for the apartment — the affiliate should remove all stored LOS data for it.\n\n## Authentication\n\nHolidu authenticates to the affiliate using an OAuth 2.0 Bearer Token ([RFC 6750](https://www.rfc-editor.org/rfc/rfc6750)).\n\n| Property | Value |\n|----------|-------|\n| **Type** | `http` |\n| **Scheme** | `bearer` |\n| **Bearer format** | `JWT` |\n\nToken exchange details are agreed upon during onboarding.\n\n## Request body examples\n\n**Multiple check-in dates with tiered pricing:**\n```json\n{\n \"los\": {\n \"2024-06-01\": [\n { \"currency\": \"EUR\", \"guests\": 2, \"price\": [0, 0, 300.00, 400.00, 500.00] },\n { \"currency\": \"EUR\", \"guests\": 4, \"price\": [0, 0, 350.00, 460.00, 580.00] }\n ],\n \"2024-06-02\": [\n { \"currency\": \"EUR\", \"guests\": 2, \"price\": [0, 150.00, 280.00] }\n ]\n }\n}\n```\n\n**Single check-in date with one pricing tier:**\n```json\n{\n \"los\": {\n \"2024-06-01\": [\n { \"currency\": \"EUR\", \"guests\": 2, \"price\": [0, 0, 300.00, 400.00, 500.00] }\n ]\n }\n}\n```\n\n**Empty LOS (no pricing available / fully booked):**\n```json\n{ \"los\": {} }\n```","security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LosDto"},"examples":{"multiDate":{"$ref":"#/components/examples/LosMultiDate"},"singleDate":{"$ref":"#/components/examples/LosSingleDate"},"fullyBooked":{"$ref":"#/components/examples/LosEmpty"}}}}},"responses":{"201":{"description":"LOS data created (first push for this apartment) ([RFC 9110 §15.3.2](https://www.rfc-editor.org/rfc/rfc9110#section-15.3.2)). The `Location` header contains the canonical URI of the new resource ([RFC 9110 §10.2.2](https://www.rfc-editor.org/rfc/rfc9110#section-10.2.2)).","headers":{"Location":{"$ref":"#/components/headers/Location"}}},"204":{"description":"LOS data replaced successfully — no response body ([RFC 9110 §15.3.5](https://www.rfc-editor.org/rfc/rfc9110#section-15.3.5))."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Holidu authenticates to the affiliate using an OAuth 2.0 Bearer Token ([RFC 6750](https://www.rfc-editor.org/rfc/rfc6750)). Token exchange details are agreed upon during onboarding."}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"issues":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}}},"BadRequest":{"description":"The request is syntactically invalid (malformed JSON, wrong types, etc.) ([RFC 9110 §15.5.1](https://www.rfc-editor.org/rfc/rfc9110#section-15.5.1)).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"},"example":{"type":"https://api.affiliate-example.com/problems/bad-request","title":"Bad Request","status":400,"detail":"Request body is not valid JSON."}}}},"Unauthorized":{"description":"Authentication credentials are missing or invalid ([RFC 9110 §15.5.2](https://www.rfc-editor.org/rfc/rfc9110#section-15.5.2)). The affiliate should return a `WWW-Authenticate` header indicating the expected scheme ([RFC 9110 §11.6.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.6.1)).","headers":{"WWW-Authenticate":{"description":"Authentication scheme expected by the affiliate.","schema":{"type":"string"},"example":"Bearer realm=\"affiliate-api\""}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"},"example":{"type":"https://api.affiliate-example.com/problems/unauthorized","title":"Unauthorized","status":401,"detail":"Bearer token is expired or invalid."}}}},"NotFound":{"description":"The affiliate does not recognise the apartment ID ([RFC 9110 §15.5.5](https://www.rfc-editor.org/rfc/rfc9110#section-15.5.5)). This may indicate a mapping or onboarding issue that Holidu should investigate.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"},"example":{"type":"https://api.affiliate-example.com/problems/not-found","title":"Not Found","status":404,"detail":"Apartment 'apt-99999' is not known to this affiliate."}}}},"PayloadTooLarge":{"description":"The request body exceeds the affiliate's maximum accepted size ([RFC 9110 §15.5.14](https://www.rfc-editor.org/rfc/rfc9110#section-15.5.14)).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"},"example":{"type":"https://api.affiliate-example.com/problems/payload-too-large","title":"Payload Too Large","status":413,"detail":"The LOS payload exceeds the maximum allowed size of 5 MB."}}}},"TooManyRequests":{"description":"The affiliate is rate-limiting Holidu ([RFC 6585 §4](https://www.rfc-editor.org/rfc/rfc6585#section-4)). Holidu will respect the `Retry-After` header before retrying.","headers":{"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"},"example":{"type":"https://api.affiliate-example.com/problems/too-many-requests","title":"Too Many Requests","status":429,"detail":"Rate limit exceeded. Retry after 60 seconds."}}}},"InternalServerError":{"description":"An unexpected error on the affiliate's side ([RFC 9110 §15.6.1](https://www.rfc-editor.org/rfc/rfc9110#section-15.6.1)).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetail"},"example":{"type":"https://api.affiliate-example.com/problems/internal-error","title":"Internal Server Error","status":500,"detail":"An unexpected error occurred."}}}}},"schemas":{"LosDto":{"type":"object","description":"The Length of Stay (LOS) represents accumulated prices per check-in date and length of stay. If the map is empty, no pricing is available for the apartment.","required":["los"],"properties":{"los":{"type":"object","description":"The key is an ISO calendar date (YYYY-MM-DD) representing the check-in date. The value is a list of price configurations for that date. A single check-in date may have multiple entries with different guest counts, each representing a separate pricing tier.","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/LosItemDto"}},"example":{"2024-06-01":[{"currency":"EUR","guests":2,"price":[0,0,300,400,500]},{"currency":"EUR","guests":4,"price":[0,0,350,460,580]}],"2024-06-02":[{"currency":"EUR","guests":2,"price":[0,150,280]}]}}}},"LosItemDto":{"type":"object","description":"A price configuration for a specific check-in date, guest count, and currency.","required":["currency","guests","price"],"properties":{"currency":{"type":"string","format":"iso-4217","description":"ISO 4217 currency code.","example":"EUR"},"guests":{"type":"integer","description":"Maximum number of guests this configuration applies to (adults + kids, babies excluded). A configuration with guests=2 applies to searches for 1 or 2 guests. Multiple entries with different guest values may exist for the same check-in date, allowing tiered pricing based on occupancy (e.g., guests=2 for base price, guests=4 for a higher rate).","example":2},"price":{"type":"array","description":"Accumulated prices indexed by length of stay. Element at index N represents the total price for an (N+1)-night stay starting on the parent check-in date. A value of 0 means checkout is not permitted on that day (encodes minimum stay rules). Maximum 62 entries.","maxItems":62,"items":{"type":"number","format":"decimal"},"example":[0,0,300,400,500]}}},"ProblemDetail":{"type":"object","description":"Error response following [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) Problem Details for HTTP APIs. Affiliates are encouraged to use this format for error responses to aid Holidu in debugging push failures.","required":["type","status","title"],"properties":{"type":{"type":"string","format":"uri","description":"A URI reference that identifies the problem type ([RFC 9457 §3.1.1](https://www.rfc-editor.org/rfc/rfc9457#section-3.1.1)).","example":"https://api.affiliate-example.com/problems/validation-error"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","example":"Validation Error"},"status":{"type":"integer","description":"The HTTP status code.","example":400},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","example":"Request body is not valid JSON."},"instance":{"type":"string","format":"uri","description":"A URI reference that identifies the specific occurrence of the problem.","example":"/apt-12345/los"}}}},"parameters":{"ApartmentId":{"name":"apartmentId","in":"path","required":true,"description":"Holidu's unique identifier for the apartment. This ID is stable and assigned during onboarding.","schema":{"type":"string"},"example":"apt-12345"}},"headers":{"Location":{"description":"URI of the newly created resource ([RFC 9110 §10.2.2](https://www.rfc-editor.org/rfc/rfc9110#section-10.2.2)).","schema":{"type":"string","format":"uri"},"example":"/apt-12345/los"},"RetryAfter":{"description":"Indicates how long Holidu should wait before retrying ([RFC 9110 §10.2.3](https://www.rfc-editor.org/rfc/rfc9110#section-10.2.3)). Value is either a number of seconds or an HTTP-date.","schema":{"type":"string"},"example":"60"}},"examples":{"LosMultiDate":{"summary":"Multiple check-in dates with tiered pricing","value":{"los":{"2024-06-01":[{"currency":"EUR","guests":2,"price":[0,0,300,400,500]},{"currency":"EUR","guests":4,"price":[0,0,350,460,580]}],"2024-06-02":[{"currency":"EUR","guests":2,"price":[0,150,280]}]}}},"LosSingleDate":{"summary":"Single check-in date with one pricing tier","value":{"los":{"2024-06-01":[{"currency":"EUR","guests":2,"price":[0,0,300,400,500]}]}}},"LosEmpty":{"summary":"Empty LOS (no pricing available)","value":{"los":{}}}}},"tags":[{"name":"LOS Push API","description":"Length of Stay pricing push operations."}]}