repull 0.2.31 → 0.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,198 @@
1
+ =begin
2
+ #Repull API
3
+
4
+ #The unified API for vacation rental tech. Connect to 50+ PMS platforms and 4 OTA channels through one REST API. Built-in AI operations for guest communication, pricing, and listing optimization. ## Designed for AI agents Every error response on this API includes machine-parseable fields so an LLM (Claude in MCP, Cursor, Cline, GPT, etc.) can self-recover without escalating to a human: - `error.code` — stable string identifier (e.g. `invalid_params`, `rate_limit_exceeded`) - `error.message` — human-readable cause - `error.fix` — exact recovery steps (e.g. \"Pass `check_in_after` as ISO 8601: `?check_in_after=2026-01-15`\") - `error.docs_url` — link to the canonical write-up at `https://repull.dev/docs/errors/{code}` - `error.request_id` — id to correlate with server-side logs - `error.field` / `error.value_received` / `error.valid_values` / `error.did_you_mean` — when the error is parameter-specific - `error.retry_after` — seconds to wait before retrying (rate-limit + transient upstream) `Access-Control-Expose-Headers` lists `x-request-id` and the `X-RateLimit-*` family so browsers can read them on cross-origin responses. ## Quick Start 1. Get an API key at https://repull.dev/dashboard 2. Connect a PMS: `POST /v1/connect/{provider}` 3. List properties: `GET /v1/properties` 4. Get reservations: `GET /v1/reservations` ## Authentication All requests require a Bearer token: ``` Authorization: Bearer sk_live_YOUR_API_KEY ``` ## Request Correlation (X-Request-ID) Every response carries an `X-Request-ID` header, e.g. `X-Request-ID: req_01HXY...`. Include this id in support tickets and bug reports — we can trace the full request lifecycle (auth, rate limit, handler, downstream calls, log row) from a single id. You may set the header on the inbound request to forward your own trace id; we will echo it back instead of generating a new one. Accepted format: `^[\\\\w.-]{1,128}$`. The id is also embedded in error envelopes as `request_id` so server-side log diffs work even when the response headers are stripped by an intermediate proxy. ## Rate Limits The public API enforces a per-API-key sliding-window rate limit on top of the per-tier monthly + daily-AI quotas. **Default policy:** 600 requests per 60 seconds, per API key. Sliding window — there is no fixed-minute boundary you can burst across. Every response includes: | Header | Meaning | |---|---| | `X-RateLimit-Limit` | Requests permitted in the current window. | | `X-RateLimit-Remaining` | Requests left in the current window after this call. | | `X-RateLimit-Reset` | Unix epoch (seconds) when the next slot opens. | | `X-RateLimit-Policy` | Machine-readable policy descriptor, e.g. `600;w=60`. | | `Retry-After` | Seconds to wait before retrying. **Only present on 429 responses.** | **On 429 (rate_limit_exceeded):** the response body matches the standard error envelope with `code: \"rate_limit_exceeded\"`, plus `limit`, `window_seconds`, `retry_after`, and `request_id` fields. SDKs MUST honor `Retry-After` and use exponential backoff with jitter on subsequent retries — never a tight loop. Recommended backoff: ``` sleep_ms = (Retry-After * 1000) + random(0..250) ``` Monthly + daily-AI tier quotas (`free`, `starter`, `custom`) are enforced separately and also surface as 429s; they include `tier`, `scope`, and `resetsAt` fields. ## Plan Limits (402 — `listings_limit_exceeded`) The Repull API also enforces a per-tier cap on **active listings**: | Tier | Active listings cap | |---|---| | `free` | 3 | | `starter` | unlimited (10 included, then billed per listing) | | `custom` | unlimited | When a customer's active-listing count is above their tier cap, the API returns **`402 Payment Required`** with `error.code = \"listings_limit_exceeded\"` on every route EXCEPT: - `/v1/health` — uptime probes are never gated. - `/v1/usage/*` — so dashboards can render the over-cap state. - Any `DELETE` — so the customer can trim listings to get back under the cap without paying. Unlike 429, 402 is NOT a \"wait and retry\" condition — `Retry-After` is not set. The only paths back to 200 are: 1. `DELETE` enough listings to come back under the cap, or 2. Upgrade at `https://repull.dev/dashboard/billing`. The server-side usage cache is 60s, so the first 200 after an upgrade may take up to a minute. The envelope mirrors `rate_limit_exceeded` for SDK ergonomics: `tier`, `limit`, `active_listings`, `upgrade_url`, plus the standard `code` / `message` / `fix` / `docs_url` / `request_id`.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Repull
17
+ class TransactionPayout < ApiModelBase
18
+ # Reference of the payout this row belongs to.
19
+ attr_accessor :payout_id
20
+
21
+ attr_accessor :payout_date
22
+
23
+ # On a payout row: the net paid out to the host.
24
+ attr_accessor :paid_out_amount
25
+
26
+ # Masked destination bank account the payout was sent to (Booking.com payouts, from the statement PDF). Null on channels/rows without one.
27
+ attr_accessor :bank_destination
28
+
29
+ # Link to the channel's original payout statement PDF — the authoritative settlement record (Booking.com). Null when none.
30
+ attr_accessor :statement_url
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'payout_id' => :'payoutId',
36
+ :'payout_date' => :'payoutDate',
37
+ :'paid_out_amount' => :'paidOutAmount',
38
+ :'bank_destination' => :'bankDestination',
39
+ :'statement_url' => :'statementUrl'
40
+ }
41
+ end
42
+
43
+ # Returns attribute mapping this model knows about
44
+ def self.acceptable_attribute_map
45
+ attribute_map
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ acceptable_attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'payout_id' => :'String',
57
+ :'payout_date' => :'String',
58
+ :'paid_out_amount' => :'Float',
59
+ :'bank_destination' => :'String',
60
+ :'statement_url' => :'String'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ :'payout_id',
68
+ :'payout_date',
69
+ :'paid_out_amount',
70
+ :'bank_destination',
71
+ :'statement_url'
72
+ ])
73
+ end
74
+
75
+ # Initializes the object
76
+ # @param [Hash] attributes Model attributes in the form of hash
77
+ def initialize(attributes = {})
78
+ if (!attributes.is_a?(Hash))
79
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Repull::TransactionPayout` initialize method"
80
+ end
81
+
82
+ # check to see if the attribute exists and convert string to symbol for hash key
83
+ acceptable_attribute_map = self.class.acceptable_attribute_map
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!acceptable_attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Repull::TransactionPayout`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'payout_id')
92
+ self.payout_id = attributes[:'payout_id']
93
+ else
94
+ self.payout_id = nil
95
+ end
96
+
97
+ if attributes.key?(:'payout_date')
98
+ self.payout_date = attributes[:'payout_date']
99
+ else
100
+ self.payout_date = nil
101
+ end
102
+
103
+ if attributes.key?(:'paid_out_amount')
104
+ self.paid_out_amount = attributes[:'paid_out_amount']
105
+ else
106
+ self.paid_out_amount = nil
107
+ end
108
+
109
+ if attributes.key?(:'bank_destination')
110
+ self.bank_destination = attributes[:'bank_destination']
111
+ end
112
+
113
+ if attributes.key?(:'statement_url')
114
+ self.statement_url = attributes[:'statement_url']
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
122
+ invalid_properties = Array.new
123
+ invalid_properties
124
+ end
125
+
126
+ # Check to see if the all the properties in the model are valid
127
+ # @return true if the model is valid
128
+ def valid?
129
+ warn '[DEPRECATED] the `valid?` method is obsolete'
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ payout_id == o.payout_id &&
139
+ payout_date == o.payout_date &&
140
+ paid_out_amount == o.paid_out_amount &&
141
+ bank_destination == o.bank_destination &&
142
+ statement_url == o.statement_url
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [payout_id, payout_date, paid_out_amount, bank_destination, statement_url].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ return nil unless attributes.is_a?(Hash)
162
+ attributes = attributes.transform_keys(&:to_sym)
163
+ transformed_hash = {}
164
+ openapi_types.each_pair do |key, type|
165
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
166
+ transformed_hash["#{key}"] = nil
167
+ elsif type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[attribute_map[key]].is_a?(Array)
171
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
172
+ end
173
+ elsif !attributes[attribute_map[key]].nil?
174
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
175
+ end
176
+ end
177
+ new(transformed_hash)
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.openapi_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ end
197
+
198
+ end
@@ -11,5 +11,5 @@ Generator version: 7.22.0
11
11
  =end
12
12
 
13
13
  module Repull
14
- VERSION = '0.2.31'
14
+ VERSION = '0.2.32'
15
15
  end
data/lib/repull.rb CHANGED
@@ -299,6 +299,7 @@ require 'repull/models/list_airbnb_thread_messages200_response_data_inner'
299
299
  require 'repull/models/list_airbnb_thread_messages200_response_pagination'
300
300
  require 'repull/models/list_airbnb_transactions200_response'
301
301
  require 'repull/models/list_booking_reservations200_response'
302
+ require 'repull/models/list_booking_transactions200_response'
302
303
  require 'repull/models/list_connection_units200_response'
303
304
  require 'repull/models/list_connection_units200_response_listing_options_inner'
304
305
  require 'repull/models/list_connection_units200_response_units_inner'
@@ -611,6 +612,9 @@ require 'repull/models/sync_airbnb_transactions200_response_accounts_inner'
611
612
  require 'repull/models/sync_airbnb_transactions200_response_accounts_inner_error'
612
613
  require 'repull/models/sync_airbnb_transactions_request'
613
614
  require 'repull/models/test_webhook_request'
615
+ require 'repull/models/transaction'
616
+ require 'repull/models/transaction_fees'
617
+ require 'repull/models/transaction_payout'
614
618
  require 'repull/models/update_airbnb_booking_settings200_response'
615
619
  require 'repull/models/update_airbnb_booking_settings200_response_data'
616
620
  require 'repull/models/update_airbnb_booking_settings_request'
@@ -702,6 +706,7 @@ require 'repull/api/reservations_api'
702
706
  require 'repull/api/reviews_api'
703
707
  require 'repull/api/schema_api'
704
708
  require 'repull/api/system_api'
709
+ require 'repull/api/transactions_api'
705
710
  require 'repull/api/vrbo_api'
706
711
  require 'repull/api/webhooks_api'
707
712
  require 'repull/api/workspaces_api'
data/openapi/v1.json CHANGED
@@ -58,6 +58,10 @@
58
58
  "name": "Reservations",
59
59
  "description": "Query, create, update, and cancel reservations"
60
60
  },
61
+ {
62
+ "name": "Transactions",
63
+ "description": "Unified transactions & payments ledger across channels \u2014 payouts, reservation charges, refunds. `booking` covers Booking.com however it was connected."
64
+ },
61
65
  {
62
66
  "name": "Availability",
63
67
  "description": "Check and update property availability and pricing"
@@ -593,6 +597,30 @@
593
597
  "description": "Local check-out time for this stay, `HH:MM` on a 24-hour clock in the property's own timezone. Pair with `checkOut` to schedule the turnover clean. `null` when unknown. This is the same field `PATCH /v1/reservations/{id}` writes.",
594
598
  "example": "10:00"
595
599
  },
600
+ "guestNotes": {
601
+ "type": "string",
602
+ "nullable": true,
603
+ "description": "What the guest wrote with the booking, as the channel sent it. Booking.com puts the estimated arrival time and special requests here. Free text, never parsed. `null` when the guest left none.",
604
+ "example": "Approximate time of arrival: between 15:00 and 16:00"
605
+ },
606
+ "conversationId": {
607
+ "type": "string",
608
+ "nullable": true,
609
+ "description": "The conversation with this guest \u2014 pass it to `GET /v1/conversations/{id}` and `/v1/conversations/{id}/messages`. It is the same conversation from inquiry through pre-approval to the confirmed booking, and the same id the message webhooks carry, so a booking links straight to the messages that led to it. `null` when the channel has no conversation for this booking.",
610
+ "example": "164743"
611
+ },
612
+ "externalThreadId": {
613
+ "type": "string",
614
+ "nullable": true,
615
+ "description": "The channel's own id for that conversation (Airbnb thread id, Booking.com conversation id, \u2026). `null` when there is none.",
616
+ "example": "2680544213"
617
+ },
618
+ "inquiryId": {
619
+ "type": "string",
620
+ "nullable": true,
621
+ "description": "The inquiry this booking came from (`GET /v1/inquiries`), when the guest asked before booking. When an inquiry turns into a booking, `inquiry.updated` fires with `status: \"booked\"` and this reservation's id. `null` for bookings with no inquiry.",
622
+ "example": "25173"
623
+ },
596
624
  "status": {
597
625
  "type": "string",
598
626
  "example": "confirmed",
@@ -2731,6 +2759,30 @@
2731
2759
  "nullable": true,
2732
2760
  "description": "Local check-out time, `HH:MM` on a 24-hour clock in the property's own timezone. Pair it with `checkoutDate` to schedule the turnover. `null` when unknown.",
2733
2761
  "example": "10:00"
2762
+ },
2763
+ "guestNotes": {
2764
+ "type": "string",
2765
+ "nullable": true,
2766
+ "description": "What the guest wrote with the booking \u2014 on Booking.com, the estimated arrival time and special requests. Free text. `null` when there were none.",
2767
+ "example": "Approximate time of arrival: between 15:00 and 16:00"
2768
+ },
2769
+ "conversationId": {
2770
+ "type": "string",
2771
+ "nullable": true,
2772
+ "description": "The conversation with this guest \u2014 pass it to `GET /v1/conversations/{id}` and `/v1/conversations/{id}/messages`. It is the same conversation from inquiry through pre-approval to the confirmed booking, and the same id the message webhooks carry, so a booking links straight to the messages that led to it. `null` when the channel has no conversation for this booking.",
2773
+ "example": "164743"
2774
+ },
2775
+ "externalThreadId": {
2776
+ "type": "string",
2777
+ "nullable": true,
2778
+ "description": "The channel's own id for that conversation (Airbnb thread id, Booking.com conversation id, \u2026). `null` when there is none.",
2779
+ "example": "2680544213"
2780
+ },
2781
+ "inquiryId": {
2782
+ "type": "string",
2783
+ "nullable": true,
2784
+ "description": "The inquiry this booking came from (`GET /v1/inquiries`), when the guest asked before booking. When an inquiry turns into a booking, `inquiry.updated` fires with `status: \"booked\"` and this reservation's id. `null` for bookings with no inquiry.",
2785
+ "example": "25173"
2734
2786
  }
2735
2787
  }
2736
2788
  },
@@ -7235,6 +7287,151 @@
7235
7287
  }
7236
7288
  }
7237
7289
  },
7290
+ "Transaction": {
7291
+ "type": "object",
7292
+ "description": "One row of the unified transactions & payments ledger: a payout (`isPayout: true`) or a reservation charge / refund, on any channel. `platform` is normalized \u2014 `booking` is Booking.com however the account was connected (never `booking_extranet`). For a payout, `amount` is the net the host received, `grossAmount` the guest-paid gross, and `fees` the deductions (commission, payments service fee, processing fee).",
7293
+ "required": [
7294
+ "transactionId",
7295
+ "platform",
7296
+ "isPayout",
7297
+ "fees",
7298
+ "payout"
7299
+ ],
7300
+ "properties": {
7301
+ "transactionId": {
7302
+ "type": "string",
7303
+ "nullable": true,
7304
+ "description": "Stable id of the transaction (the underlying payment id). Upsert on it.",
7305
+ "example": "booking_payout_5463377687_bank_transfer"
7306
+ },
7307
+ "platform": {
7308
+ "type": "string",
7309
+ "nullable": true,
7310
+ "description": "Normalized channel: `airbnb`, `booking` (Booking.com, however connected \u2014 never `booking_extranet`), or `vrbo`.",
7311
+ "example": "booking"
7312
+ },
7313
+ "type": {
7314
+ "type": "string",
7315
+ "nullable": true,
7316
+ "description": "Transaction type: `Payout`, `Reservation`, `Refund`, \u2026",
7317
+ "example": "Payout"
7318
+ },
7319
+ "isPayout": {
7320
+ "type": "boolean",
7321
+ "description": "`true` when this is money that reached the host (a payout)."
7322
+ },
7323
+ "status": {
7324
+ "type": "string",
7325
+ "nullable": true,
7326
+ "description": "Normalized settlement status (`COMPLETED` / `UPCOMING`; the raw value passes through when it maps to neither).",
7327
+ "example": "COMPLETED"
7328
+ },
7329
+ "date": {
7330
+ "type": "string",
7331
+ "nullable": true,
7332
+ "description": "Transaction / payout date (the channel's display form or ISO).",
7333
+ "example": "27 Aug 2026"
7334
+ },
7335
+ "currency": {
7336
+ "type": "string",
7337
+ "nullable": true,
7338
+ "example": "NOK"
7339
+ },
7340
+ "amount": {
7341
+ "type": "number",
7342
+ "nullable": true,
7343
+ "description": "Net amount; for a payout, what the host received.",
7344
+ "example": 18597.12
7345
+ },
7346
+ "grossAmount": {
7347
+ "type": "number",
7348
+ "nullable": true,
7349
+ "description": "Guest-paid gross (payouts).",
7350
+ "example": 22272
7351
+ },
7352
+ "fees": {
7353
+ "type": "object",
7354
+ "required": [
7355
+ "commission",
7356
+ "serviceFee",
7357
+ "processingFee"
7358
+ ],
7359
+ "properties": {
7360
+ "commission": {
7361
+ "type": "number",
7362
+ "nullable": true,
7363
+ "description": "Channel commission deducted.",
7364
+ "example": 3340.8
7365
+ },
7366
+ "serviceFee": {
7367
+ "type": "number",
7368
+ "nullable": true,
7369
+ "description": "Payments service fee deducted.",
7370
+ "example": 334.08
7371
+ },
7372
+ "processingFee": {
7373
+ "type": "number",
7374
+ "nullable": true
7375
+ }
7376
+ }
7377
+ },
7378
+ "payout": {
7379
+ "type": "object",
7380
+ "required": [
7381
+ "payoutId",
7382
+ "payoutDate",
7383
+ "paidOutAmount"
7384
+ ],
7385
+ "properties": {
7386
+ "payoutId": {
7387
+ "type": "string",
7388
+ "nullable": true,
7389
+ "description": "Reference of the payout this row belongs to.",
7390
+ "example": "gkvDj0Jm9ZaA6IiO"
7391
+ },
7392
+ "payoutDate": {
7393
+ "type": "string",
7394
+ "nullable": true
7395
+ },
7396
+ "paidOutAmount": {
7397
+ "type": "number",
7398
+ "nullable": true,
7399
+ "description": "On a payout row: the net paid out to the host.",
7400
+ "example": 18597.12
7401
+ },
7402
+ "bankDestination": {
7403
+ "type": "string",
7404
+ "nullable": true,
7405
+ "description": "Masked destination bank account the payout was sent to (Booking.com payouts, from the statement PDF). Null on channels/rows without one.",
7406
+ "example": "NO***********404"
7407
+ },
7408
+ "statementUrl": {
7409
+ "type": "string",
7410
+ "nullable": true,
7411
+ "description": "Link to the channel's original payout statement PDF \u2014 the authoritative settlement record (Booking.com). Null when none."
7412
+ }
7413
+ }
7414
+ },
7415
+ "confirmationCode": {
7416
+ "type": "string",
7417
+ "nullable": true,
7418
+ "example": "5463377687"
7419
+ },
7420
+ "reservationId": {
7421
+ "type": "integer",
7422
+ "nullable": true
7423
+ },
7424
+ "listingId": {
7425
+ "type": "integer",
7426
+ "nullable": true
7427
+ },
7428
+ "syncedAt": {
7429
+ "type": "string",
7430
+ "format": "date-time",
7431
+ "nullable": true
7432
+ }
7433
+ }
7434
+ },
7238
7435
  "AirbnbConnectionHost": {
7239
7436
  "type": "object",
7240
7437
  "description": "One Airbnb host record under the workspace, decorated with its most recent disconnect reason from `airbnb_host_events` (backfill events excluded).",
@@ -37297,6 +37494,184 @@
37297
37494
  }
37298
37495
  }
37299
37496
  }
37497
+ },
37498
+ "/v1/channels/booking/transactions": {
37499
+ "get": {
37500
+ "operationId": "list_booking_transactions",
37501
+ "summary": "List Booking.com transactions (settlement ledger)",
37502
+ "description": "The Booking.com settlement ledger for this workspace: every payout (Payments by Booking.com \u2192 bank transfer) and reservation charge, with the gross the guest paid, Booking's commission and payments service fee, and the net paid out, each tied to its reservation. Official Connectivity-API and extranet-connected accounts are returned together as one Booking.com \u2014 there is no `booking_extranet` distinction and nothing extra to request. Cursor-paginated, newest first. (For all channels at once, use `/v1/transactions`.)",
37503
+ "tags": [
37504
+ "Booking.com"
37505
+ ],
37506
+ "parameters": [
37507
+ {
37508
+ "name": "type",
37509
+ "in": "query",
37510
+ "required": false,
37511
+ "description": "Filter by transaction type, e.g. `Payout`, `Reservation`, `Refund`.",
37512
+ "schema": {
37513
+ "type": "string"
37514
+ }
37515
+ },
37516
+ {
37517
+ "name": "status",
37518
+ "in": "query",
37519
+ "required": false,
37520
+ "description": "Filter by raw status.",
37521
+ "schema": {
37522
+ "type": "string"
37523
+ }
37524
+ },
37525
+ {
37526
+ "name": "is_payout",
37527
+ "in": "query",
37528
+ "required": false,
37529
+ "description": "When `true`, only payout rows (money that reached the host).",
37530
+ "schema": {
37531
+ "type": "boolean"
37532
+ }
37533
+ },
37534
+ {
37535
+ "name": "limit",
37536
+ "in": "query",
37537
+ "required": false,
37538
+ "description": "Page size (default 100, max 500).",
37539
+ "schema": {
37540
+ "type": "integer",
37541
+ "minimum": 1,
37542
+ "maximum": 500
37543
+ }
37544
+ },
37545
+ {
37546
+ "name": "cursor",
37547
+ "in": "query",
37548
+ "required": false,
37549
+ "description": "Opaque pagination cursor from a previous `pagination.nextCursor`.",
37550
+ "schema": {
37551
+ "type": "string"
37552
+ }
37553
+ }
37554
+ ],
37555
+ "responses": {
37556
+ "200": {
37557
+ "description": "A page of Booking.com transactions.",
37558
+ "content": {
37559
+ "application/json": {
37560
+ "schema": {
37561
+ "type": "object",
37562
+ "properties": {
37563
+ "data": {
37564
+ "type": "array",
37565
+ "items": {
37566
+ "$ref": "#/components/schemas/Transaction"
37567
+ }
37568
+ },
37569
+ "pagination": {
37570
+ "$ref": "#/components/schemas/CursorPagination"
37571
+ }
37572
+ }
37573
+ }
37574
+ }
37575
+ }
37576
+ }
37577
+ }
37578
+ }
37579
+ },
37580
+ "/v1/transactions": {
37581
+ "get": {
37582
+ "operationId": "list_transactions",
37583
+ "summary": "List transactions & payments (unified ledger)",
37584
+ "description": "Every channel's money in one ledger: payouts that reached the host, reservation charges, refunds and adjustments, across Airbnb, Booking.com and Vrbo. Each row carries a normalized `platform` \u2014 `booking` always means Booking.com however the account was connected (official API or extranet); there is no `booking_extranet`, and `?platform=booking` matches all of them. A payout row's `amount` is the net the host received; `grossAmount` is what the guest paid and `fees` the deductions (commission, payments service fee, processing fee). Cursor-paginated, newest first.",
37585
+ "tags": [
37586
+ "Transactions"
37587
+ ],
37588
+ "parameters": [
37589
+ {
37590
+ "name": "platform",
37591
+ "in": "query",
37592
+ "required": false,
37593
+ "description": "Filter to one channel: `airbnb`, `booking` (Booking.com, however connected), or `vrbo`. Omit for all channels.",
37594
+ "schema": {
37595
+ "type": "string",
37596
+ "enum": [
37597
+ "airbnb",
37598
+ "booking",
37599
+ "vrbo"
37600
+ ]
37601
+ }
37602
+ },
37603
+ {
37604
+ "name": "type",
37605
+ "in": "query",
37606
+ "required": false,
37607
+ "description": "Filter by transaction type, e.g. `Payout`, `Reservation`, `Refund`.",
37608
+ "schema": {
37609
+ "type": "string"
37610
+ }
37611
+ },
37612
+ {
37613
+ "name": "status",
37614
+ "in": "query",
37615
+ "required": false,
37616
+ "description": "Filter by raw status.",
37617
+ "schema": {
37618
+ "type": "string"
37619
+ }
37620
+ },
37621
+ {
37622
+ "name": "is_payout",
37623
+ "in": "query",
37624
+ "required": false,
37625
+ "description": "When `true`, only payout rows (money that reached the host).",
37626
+ "schema": {
37627
+ "type": "boolean"
37628
+ }
37629
+ },
37630
+ {
37631
+ "name": "limit",
37632
+ "in": "query",
37633
+ "required": false,
37634
+ "description": "Page size (default 100, max 500).",
37635
+ "schema": {
37636
+ "type": "integer",
37637
+ "minimum": 1,
37638
+ "maximum": 500
37639
+ }
37640
+ },
37641
+ {
37642
+ "name": "cursor",
37643
+ "in": "query",
37644
+ "required": false,
37645
+ "description": "Opaque pagination cursor from a previous `pagination.nextCursor`.",
37646
+ "schema": {
37647
+ "type": "string"
37648
+ }
37649
+ }
37650
+ ],
37651
+ "responses": {
37652
+ "200": {
37653
+ "description": "A page of transactions.",
37654
+ "content": {
37655
+ "application/json": {
37656
+ "schema": {
37657
+ "type": "object",
37658
+ "properties": {
37659
+ "data": {
37660
+ "type": "array",
37661
+ "items": {
37662
+ "$ref": "#/components/schemas/Transaction"
37663
+ }
37664
+ },
37665
+ "pagination": {
37666
+ "$ref": "#/components/schemas/CursorPagination"
37667
+ }
37668
+ }
37669
+ }
37670
+ }
37671
+ }
37672
+ }
37673
+ }
37674
+ }
37300
37675
  }
37301
37676
  }
37302
37677
  }