openapi: 3.0.3 info: title: Partner listings API version: "1.0" description: > Listings, calendar of prices and free dates, booking requests. Human-readable description: README.md (ru), README.en.md (en). Every request is signed with HMAC-SHA256; see README, "Request signature". Responses never contain guest data, our prices or other partners' data. servers: - url: https://{host}/partner-api/v1 variables: host: default: partner.example.com description: Your partner account host security: - HPKey: [] HPTimestamp: [] HPNonce: [] HPSignature: [] paths: /listings: get: operationId: listListings summary: Listings we hold and their review state parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: '200': description: A page of listings ordered by external_id content: application/json: schema: $ref: '#/components/schemas/ListingPage' '400': { $ref: '#/components/responses/Error' } '401': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } /listings/{external_id}: parameters: - $ref: '#/components/parameters/ExternalID' get: operationId: getListing summary: One listing responses: '200': description: The listing card content: application/json: schema: $ref: '#/components/schemas/Listing' '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } put: operationId: putListing summary: Create or update a listing parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ListingInput' responses: '200': description: Updated content: application/json: schema: $ref: '#/components/schemas/Listing' '201': description: Created, state "review" content: application/json: schema: $ref: '#/components/schemas/Listing' '400': { $ref: '#/components/responses/Error' } '401': { $ref: '#/components/responses/Error' } '409': { $ref: '#/components/responses/Error' } '413': { $ref: '#/components/responses/Error' } '422': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } /listings/{external_id}/calendar: parameters: - $ref: '#/components/parameters/ExternalID' get: operationId: getCalendar summary: The calendar we hold parameters: - name: from in: query schema: { type: string, format: date } description: First day, inclusive. Default is today - name: to in: query schema: { type: string, format: date } description: Last day, inclusive. Default is 90 days from "from"; at most 731 days responses: '200': description: Days in effect content: application/json: schema: $ref: '#/components/schemas/Calendar' '400': { $ref: '#/components/responses/Error' } '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } put: operationId: putCalendar summary: Upload prices and free dates parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CalendarUpload' responses: '200': description: Stored as an immutable snapshot content: application/json: schema: $ref: '#/components/schemas/CalendarUploadResult' '400': { $ref: '#/components/responses/Error' } '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } '413': { $ref: '#/components/responses/Error' } '422': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } /booking-requests: get: operationId: listBookingRequests summary: Booking requests, newest first parameters: - name: status in: query schema: { type: string, enum: [pending, confirmed, declined, expired] } - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: '200': description: A page of booking requests content: application/json: schema: $ref: '#/components/schemas/BookingRequestPage' '400': { $ref: '#/components/responses/Error' } '401': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } /booking-requests/{id}: parameters: - $ref: '#/components/parameters/RequestID' get: operationId: getBookingRequest summary: One booking request responses: '200': description: The booking request content: application/json: schema: $ref: '#/components/schemas/BookingRequest' '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } /booking-requests/{id}/confirm: parameters: - $ref: '#/components/parameters/RequestID' post: operationId: confirmBookingRequest summary: Confirm; creates the booking on our side parameters: - $ref: '#/components/parameters/IdempotencyKey' responses: '200': description: Confirmed content: application/json: schema: $ref: '#/components/schemas/BookingRequest' '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } '409': description: dates_conflict (taken in our calendar), expired or already_answered content: application/json: schema: $ref: '#/components/schemas/Error' '429': { $ref: '#/components/responses/Error' } /booking-requests/{id}/decline: parameters: - $ref: '#/components/parameters/RequestID' post: operationId: declineBookingRequest summary: Decline with a reason parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeclineInput' responses: '200': description: Declined content: application/json: schema: $ref: '#/components/schemas/BookingRequest' '401': { $ref: '#/components/responses/Error' } '404': { $ref: '#/components/responses/Error' } '409': { $ref: '#/components/responses/Error' } '422': { $ref: '#/components/responses/Error' } '429': { $ref: '#/components/responses/Error' } components: securitySchemes: HPKey: { type: apiKey, in: header, name: X-HP-Key, description: key_id of your key } HPTimestamp: { type: apiKey, in: header, name: X-HP-Timestamp, description: 'UTC time, ISO 8601: 2026-11-25T10:00:00Z; window is 5 minutes' } HPNonce: { type: apiKey, in: header, name: X-HP-Nonce, description: 'One-time value, 16-64 characters, remembered for 24 hours' } HPSignature: { type: apiKey, in: header, name: X-HP-Signature, description: 'HMAC-SHA256 hex of METHOD\nPATH_WITH_QUERY\nTIMESTAMP\nNONCE\nRAW_BODY' } parameters: ExternalID: name: external_id in: path required: true schema: { type: string, pattern: '^[A-Za-z0-9_.:-]{1,64}$' } description: Listing identifier in your system RequestID: name: id in: path required: true schema: { type: string, format: uuid } Limit: name: limit in: query schema: { type: integer, minimum: 1, maximum: 100, default: 50 } Cursor: name: cursor in: query schema: { type: string } description: next_cursor of the previous page IdempotencyKey: name: Idempotency-Key in: header schema: { type: string, pattern: '^[A-Za-z0-9_.:-]{8,128}$' } description: Repeat with the same key and body returns the stored response; lives for 24 hours responses: Error: description: Error with a code and words content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Error: type: object required: [error, code] properties: error: { type: string, description: Explanation in words } code: { type: string } index: { type: integer, description: 'Number of the days entry, from zero (calendar errors)' } reason: { type: string } status: { type: string, description: 'Current state of the booking request (409 already_answered)' } ListingInput: type: object required: [kind, title, type, city] additionalProperties: false properties: kind: { type: string, enum: [housing, transport] } title: { type: string, maxLength: 200 } type: { type: string, description: 'housing: apartment, house, villa, condo, townhouse, studio, land; transport: car, suv, pickup, van, minivan, scooter, motorbike' } description: { type: string } district: { type: string } city: { type: string } capacity: { type: integer, minimum: 1, maximum: 100 } bedrooms: { type: integer, minimum: 0 } bathrooms: { type: integer, minimum: 0 } amenities: { type: array, items: { type: string } } address: { type: string, description: Service address; stored, never returned } photos: { type: array, maxItems: 30, items: { type: string, format: uri } } Listing: type: object properties: external_id: { type: string } kind: { type: string, enum: [housing, transport] } title: { type: string } type: { type: string } description: { type: string } district: { type: string } city: { type: string } capacity: { type: integer, nullable: true } bedrooms: { type: integer, nullable: true } bathrooms: { type: integer, nullable: true } amenities: { type: array, items: { type: string } } review: type: object properties: status: { type: string, enum: [draft, review, returned, accepted] } comment: { type: string } change_pending: { type: boolean } photos: type: array items: type: object properties: url: { type: string } status: { type: string, enum: [pending, done, failed] } error: { type: string, nullable: true } calendar: type: object properties: synced_at: { type: string, format: date-time, nullable: true } stale: { type: boolean } created_at: { type: string, format: date-time } not_applied: { type: array, items: { type: string }, description: Fields of an accepted listing that only the manager changes } ListingPage: type: object properties: items: { type: array, items: { $ref: '#/components/schemas/Listing' } } next_cursor: { type: string, nullable: true } Rates: type: object additionalProperties: false description: Your prices by rental period in minor currency units; a missing period means the listing is not rented by it properties: night: { type: integer, minimum: 1 } month: { type: integer, minimum: 1 } year: { type: integer, minimum: 1 } MinStay: type: object required: [value, unit] additionalProperties: false properties: value: { type: integer, minimum: 1 } unit: { type: string, enum: [night, month] } CalendarDayInput: type: object required: [available] additionalProperties: false description: Either date, or from and to (both inclusive) properties: date: { type: string, format: date } from: { type: string, format: date } to: { type: string, format: date } available: { type: boolean } rates: { $ref: '#/components/schemas/Rates' } min_stay: { $ref: '#/components/schemas/MinStay' } CalendarUpload: type: object required: [currency, days] additionalProperties: false properties: currency: { type: string, pattern: '^[A-Z]{3}$' } timezone: { type: string } replace_all: { type: boolean, default: false } days: { type: array, minItems: 1, maxItems: 800, items: { $ref: '#/components/schemas/CalendarDayInput' } } CalendarUploadResult: type: object properties: snapshot_id: { type: string, format: uuid } mode: { type: string, enum: [merge, replace_all] } days: { type: integer } from: { type: string, format: date } to: { type: string, format: date } synced_at: { type: string, format: date-time } CalendarDay: type: object properties: date: { type: string, format: date } state: { type: string, enum: [free, busy, no_data] } available: { type: boolean } rates: { $ref: '#/components/schemas/Rates' } min_stay: { $ref: '#/components/schemas/MinStay' } Calendar: type: object properties: external_id: { type: string } currency: { type: string } from: { type: string, format: date } to: { type: string, format: date } synced_at: { type: string, format: date-time, nullable: true } stale: { type: boolean } days: { type: array, items: { $ref: '#/components/schemas/CalendarDay' } } Money: type: object properties: amount_minor: { type: integer } currency: { type: string } BookingRequestListing: type: object properties: external_id: { type: string, nullable: true } kind: { type: string, enum: [housing, transport] } title: { type: string } BookingRequest: type: object properties: id: { type: string, format: uuid } number: { type: string, description: Our request number } listing: { $ref: '#/components/schemas/BookingRequestListing' } check_in: { type: string, format: date } check_out: { type: string, format: date } nights: { type: integer } guests: { type: integer } status: { type: string, enum: [pending, confirmed, declined, expired] } your_price: allOf: [{ $ref: '#/components/schemas/Money' }] nullable: true description: Your price for the requested term, computed from your calendar requested_at: { type: string, format: date-time } respond_by: { type: string, format: date-time } responded_at: { type: string, format: date-time, nullable: true } decline_reason: { type: string, enum: [dates_taken, price_changed, not_available, maintenance, other] } BookingRequestPage: type: object properties: items: { type: array, items: { $ref: '#/components/schemas/BookingRequest' } } next_cursor: { type: string, nullable: true } DeclineInput: type: object required: [reason] properties: reason: { type: string, enum: [dates_taken, price_changed, not_available, maintenance, other] }