repull 0.2.31 → 0.2.33

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/repull/api/booking_com_api.rb +80 -0
  4. data/lib/repull/api/connections_api.rb +77 -0
  5. data/lib/repull/api/resolutions_api.rb +236 -0
  6. data/lib/repull/api/transactions_api.rb +182 -0
  7. data/lib/repull/models/account_import.rb +237 -0
  8. data/lib/repull/models/account_import_completed_event.rb +282 -0
  9. data/lib/repull/models/account_import_counts.rb +193 -0
  10. data/lib/repull/models/account_import_failed_event.rb +282 -0
  11. data/lib/repull/models/account_import_finished_payload.rb +224 -0
  12. data/lib/repull/models/account_import_stage.rb +177 -0
  13. data/lib/repull/models/account_import_started_event.rb +282 -0
  14. data/lib/repull/models/account_import_started_payload.rb +177 -0
  15. data/lib/repull/models/connection.rb +16 -5
  16. data/lib/repull/models/list_airbnb_resolutions200_response.rb +192 -0
  17. data/lib/repull/models/list_booking_transactions200_response.rb +158 -0
  18. data/lib/repull/models/list_connection_imports200_response.rb +158 -0
  19. data/lib/repull/models/refresh_airbnb_resolutions200_response.rb +219 -0
  20. data/lib/repull/models/refresh_airbnb_resolutions200_response_accounts_inner.rb +200 -0
  21. data/lib/repull/models/refresh_airbnb_resolutions200_response_accounts_inner_error.rb +156 -0
  22. data/lib/repull/models/refresh_airbnb_resolutions_request.rb +192 -0
  23. data/lib/repull/models/reservation.rb +45 -1
  24. data/lib/repull/models/reservation_webhook_object.rb +49 -5
  25. data/lib/repull/models/resolution.rb +329 -0
  26. data/lib/repull/models/transaction.rb +349 -0
  27. data/lib/repull/models/transaction_fees.rb +176 -0
  28. data/lib/repull/models/transaction_payout.rb +209 -0
  29. data/lib/repull/models/webhook_event.rb +6 -0
  30. data/lib/repull/models/webhook_event_type.rb +4 -1
  31. data/lib/repull/version.rb +1 -1
  32. data/lib/repull.rb +21 -0
  33. data/openapi/v1.json +1295 -153
  34. data/scripts/regen.sh +1 -1
  35. metadata +23 -2
data/openapi/v1.json CHANGED
@@ -58,6 +58,14 @@
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
+ },
65
+ {
66
+ "name": "Resolutions",
67
+ "description": "Airbnb Resolution Center cases (AirCover / damage, extra-guest, refund and change requests) \u2014 read-only visibility on open and closed resolutions. The money a resolution moved is in the transactions ledger; join on the resolution id."
68
+ },
61
69
  {
62
70
  "name": "Availability",
63
71
  "description": "Check and update property availability and pricing"
@@ -593,6 +601,30 @@
593
601
  "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
602
  "example": "10:00"
595
603
  },
604
+ "guestNotes": {
605
+ "type": "string",
606
+ "nullable": true,
607
+ "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.",
608
+ "example": "Approximate time of arrival: between 15:00 and 16:00"
609
+ },
610
+ "conversationId": {
611
+ "type": "string",
612
+ "nullable": true,
613
+ "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.",
614
+ "example": "164743"
615
+ },
616
+ "externalThreadId": {
617
+ "type": "string",
618
+ "nullable": true,
619
+ "description": "The channel's own id for that conversation (Airbnb thread id, Booking.com conversation id, \u2026). `null` when there is none.",
620
+ "example": "2680544213"
621
+ },
622
+ "inquiryId": {
623
+ "type": "string",
624
+ "nullable": true,
625
+ "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.",
626
+ "example": "25173"
627
+ },
596
628
  "status": {
597
629
  "type": "string",
598
630
  "example": "confirmed",
@@ -1516,6 +1548,15 @@
1516
1548
  "format": "uri",
1517
1549
  "nullable": true,
1518
1550
  "description": "Durable link that reopens the hosted Connect flow bound to this account on the fix screen \u2014 send the host here to resolve `action`. Present only when `action.required` is true; `null` otherwise."
1551
+ },
1552
+ "import": {
1553
+ "allOf": [
1554
+ {
1555
+ "$ref": "#/components/schemas/AccountImport"
1556
+ }
1557
+ ],
1558
+ "nullable": true,
1559
+ "description": "The account's latest import \u2014 `status: running` while the first sync (or a later one) is going, then `completed` or `failed`. `null` when no import has been recorded. The same run is announced by the `account.import.*` webhooks; the history is on `GET /v1/connections/{id}/imports`."
1519
1560
  }
1520
1561
  }
1521
1562
  },
@@ -2645,6 +2686,9 @@
2645
2686
  "account.created",
2646
2687
  "connect.session.completed",
2647
2688
  "account.disconnected",
2689
+ "account.import.started",
2690
+ "account.import.completed",
2691
+ "account.import.failed",
2648
2692
  "review.created",
2649
2693
  "review.responded",
2650
2694
  "ai.operation.completed",
@@ -2731,6 +2775,30 @@
2731
2775
  "nullable": true,
2732
2776
  "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
2777
  "example": "10:00"
2778
+ },
2779
+ "guestNotes": {
2780
+ "type": "string",
2781
+ "nullable": true,
2782
+ "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.",
2783
+ "example": "Approximate time of arrival: between 15:00 and 16:00"
2784
+ },
2785
+ "conversationId": {
2786
+ "type": "string",
2787
+ "nullable": true,
2788
+ "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.",
2789
+ "example": "164743"
2790
+ },
2791
+ "externalThreadId": {
2792
+ "type": "string",
2793
+ "nullable": true,
2794
+ "description": "The channel's own id for that conversation (Airbnb thread id, Booking.com conversation id, \u2026). `null` when there is none.",
2795
+ "example": "2680544213"
2796
+ },
2797
+ "inquiryId": {
2798
+ "type": "string",
2799
+ "nullable": true,
2800
+ "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.",
2801
+ "example": "25173"
2734
2802
  }
2735
2803
  }
2736
2804
  },
@@ -4838,223 +4906,492 @@
4838
4906
  }
4839
4907
  }
4840
4908
  },
4841
- "ConnectSessionCompletedEvent": {
4909
+ "AccountImportStage": {
4842
4910
  "type": "object",
4843
- "required": [
4844
- "event",
4845
- "eventId",
4846
- "apiVersion",
4847
- "timestamp",
4848
- "data"
4849
- ],
4911
+ "description": "One stage of an account import (e.g. `reservations`). The stage is done when `done + failed` reaches `expected`.",
4850
4912
  "properties": {
4851
- "event": {
4852
- "type": "string",
4853
- "description": "The event name. This field is `event`, not `type`."
4854
- },
4855
- "eventId": {
4856
- "type": "string",
4857
- "format": "uuid",
4858
- "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
4859
- },
4860
- "apiVersion": {
4913
+ "name": {
4861
4914
  "type": "string",
4862
- "example": "2026-04"
4915
+ "example": "reservations"
4863
4916
  },
4864
- "timestamp": {
4865
- "type": "string",
4866
- "format": "date-time",
4867
- "description": "When this delivery was built."
4917
+ "expected": {
4918
+ "type": "integer",
4919
+ "nullable": true,
4920
+ "description": "Units of work in this stage (one per page, chunk, listing or thread, depending on the channel). `null` until the stage knows its size."
4868
4921
  },
4869
- "account": {
4870
- "$ref": "#/components/schemas/WebhookEventAccount"
4922
+ "done": {
4923
+ "type": "integer"
4871
4924
  },
4872
- "data": {
4873
- "$ref": "#/components/schemas/ConnectSessionCompletedPayload"
4925
+ "failed": {
4926
+ "type": "integer"
4874
4927
  }
4875
4928
  }
4876
4929
  },
4877
- "AccountDisconnectedEvent": {
4930
+ "AccountImportCounts": {
4878
4931
  "type": "object",
4879
- "required": [
4880
- "event",
4881
- "eventId",
4882
- "apiVersion",
4883
- "timestamp",
4884
- "data"
4885
- ],
4932
+ "description": "What the import brought in. A channel reports the keys it imports.",
4886
4933
  "properties": {
4887
- "event": {
4888
- "type": "string",
4889
- "description": "The event name. This field is `event`, not `type`."
4934
+ "listings": {
4935
+ "type": "integer"
4890
4936
  },
4891
- "eventId": {
4892
- "type": "string",
4893
- "format": "uuid",
4894
- "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
4937
+ "reservations": {
4938
+ "type": "integer"
4895
4939
  },
4896
- "apiVersion": {
4897
- "type": "string",
4898
- "example": "2026-04"
4940
+ "conversations": {
4941
+ "type": "integer"
4899
4942
  },
4900
- "timestamp": {
4901
- "type": "string",
4902
- "format": "date-time",
4903
- "description": "When this delivery was built."
4943
+ "messages": {
4944
+ "type": "integer"
4904
4945
  },
4905
- "account": {
4906
- "$ref": "#/components/schemas/WebhookEventAccount"
4946
+ "reviews": {
4947
+ "type": "integer"
4907
4948
  },
4908
- "data": {
4909
- "$ref": "#/components/schemas/AccountDisconnectedPayload"
4949
+ "payments": {
4950
+ "type": "integer"
4910
4951
  }
4911
4952
  }
4912
4953
  },
4913
- "ReviewCreatedEvent": {
4954
+ "AccountImport": {
4914
4955
  "type": "object",
4915
- "required": [
4916
- "event",
4917
- "eventId",
4918
- "apiVersion",
4919
- "timestamp",
4920
- "data"
4921
- ],
4956
+ "description": "One import run of a connected account: the first sync after connecting, a room or unit mapped later, a reconnect or a re-sync.",
4922
4957
  "properties": {
4923
- "event": {
4924
- "type": "string",
4925
- "description": "The event name. This field is `event`, not `type`."
4926
- },
4927
- "eventId": {
4958
+ "id": {
4928
4959
  "type": "string",
4929
4960
  "format": "uuid",
4930
- "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
4961
+ "description": "The import id \u2014 the `importId` on `account.import.*` webhooks."
4931
4962
  },
4932
- "apiVersion": {
4933
- "type": "string",
4934
- "example": "2026-04"
4963
+ "status": {
4964
+ "type": "string"
4935
4965
  },
4936
- "timestamp": {
4937
- "type": "string",
4938
- "format": "date-time",
4939
- "description": "When this delivery was built."
4966
+ "trigger": {
4967
+ "type": "string"
4940
4968
  },
4941
- "account": {
4942
- "$ref": "#/components/schemas/WebhookEventAccount"
4969
+ "outcome": {
4970
+ "type": "string",
4971
+ "nullable": true,
4972
+ "description": "`completed` imports only: `partial` when some units failed (see `stages`)."
4943
4973
  },
4944
- "data": {
4945
- "$ref": "#/components/schemas/ReviewCreatedPayload"
4946
- }
4947
- }
4948
- },
4949
- "ReviewRespondedEvent": {
4950
- "type": "object",
4951
- "required": [
4952
- "event",
4953
- "eventId",
4954
- "apiVersion",
4955
- "timestamp",
4956
- "data"
4957
- ],
4958
- "properties": {
4959
- "event": {
4974
+ "reason": {
4960
4975
  "type": "string",
4961
- "description": "The event name. This field is `event`, not `type`."
4976
+ "nullable": true,
4977
+ "description": "`failed` imports only: why it stopped \u2014 e.g. `needs_permissions`, `duplicate_account`, `stalled`."
4962
4978
  },
4963
- "eventId": {
4979
+ "startedAt": {
4964
4980
  "type": "string",
4965
- "format": "uuid",
4966
- "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
4981
+ "format": "date-time"
4967
4982
  },
4968
- "apiVersion": {
4983
+ "lastActivityAt": {
4969
4984
  "type": "string",
4970
- "example": "2026-04"
4985
+ "format": "date-time"
4971
4986
  },
4972
- "timestamp": {
4987
+ "completedAt": {
4973
4988
  "type": "string",
4974
4989
  "format": "date-time",
4975
- "description": "When this delivery was built."
4990
+ "nullable": true
4976
4991
  },
4977
- "account": {
4978
- "$ref": "#/components/schemas/WebhookEventAccount"
4992
+ "stages": {
4993
+ "type": "array",
4994
+ "items": {
4995
+ "$ref": "#/components/schemas/AccountImportStage"
4996
+ }
4979
4997
  },
4980
- "data": {
4981
- "$ref": "#/components/schemas/ReviewRespondedPayload"
4998
+ "counts": {
4999
+ "$ref": "#/components/schemas/AccountImportCounts"
4982
5000
  }
4983
5001
  }
4984
5002
  },
4985
- "AiOperationCompletedEvent": {
5003
+ "AccountImportStartedPayload": {
4986
5004
  "type": "object",
4987
- "required": [
4988
- "event",
4989
- "eventId",
4990
- "apiVersion",
4991
- "timestamp",
4992
- "data"
4993
- ],
4994
5005
  "properties": {
4995
- "event": {
4996
- "type": "string",
4997
- "description": "The event name. This field is `event`, not `type`."
4998
- },
4999
- "eventId": {
5006
+ "importId": {
5000
5007
  "type": "string",
5001
- "format": "uuid",
5002
- "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5008
+ "format": "uuid"
5003
5009
  },
5004
- "apiVersion": {
5005
- "type": "string",
5006
- "example": "2026-04"
5010
+ "trigger": {
5011
+ "type": "string"
5007
5012
  },
5008
- "timestamp": {
5013
+ "startedAt": {
5009
5014
  "type": "string",
5010
- "format": "date-time",
5011
- "description": "When this delivery was built."
5012
- },
5013
- "account": {
5014
- "$ref": "#/components/schemas/WebhookEventAccount"
5015
+ "format": "date-time"
5015
5016
  },
5016
- "data": {
5017
- "$ref": "#/components/schemas/AiOperationCompletedPayload"
5017
+ "stages": {
5018
+ "type": "array",
5019
+ "items": {
5020
+ "type": "string"
5021
+ },
5022
+ "description": "The stages this import will run."
5018
5023
  }
5019
5024
  }
5020
5025
  },
5021
- "AiOperationFailedEvent": {
5026
+ "AccountImportFinishedPayload": {
5022
5027
  "type": "object",
5023
- "required": [
5024
- "event",
5025
- "eventId",
5026
- "apiVersion",
5027
- "timestamp",
5028
- "data"
5029
- ],
5030
5028
  "properties": {
5031
- "event": {
5029
+ "importId": {
5032
5030
  "type": "string",
5033
- "description": "The event name. This field is `event`, not `type`."
5031
+ "format": "uuid"
5034
5032
  },
5035
- "eventId": {
5033
+ "trigger": {
5034
+ "type": "string"
5035
+ },
5036
+ "status": {
5037
+ "type": "string"
5038
+ },
5039
+ "outcome": {
5036
5040
  "type": "string",
5037
- "format": "uuid",
5038
- "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5041
+ "nullable": true
5039
5042
  },
5040
- "apiVersion": {
5043
+ "startedAt": {
5041
5044
  "type": "string",
5042
- "example": "2026-04"
5045
+ "format": "date-time"
5043
5046
  },
5044
- "timestamp": {
5047
+ "completedAt": {
5045
5048
  "type": "string",
5046
- "format": "date-time",
5047
- "description": "When this delivery was built."
5049
+ "format": "date-time"
5048
5050
  },
5049
- "account": {
5050
- "$ref": "#/components/schemas/WebhookEventAccount"
5051
+ "stages": {
5052
+ "type": "array",
5053
+ "items": {
5054
+ "$ref": "#/components/schemas/AccountImportStage"
5055
+ }
5051
5056
  },
5052
- "data": {
5053
- "$ref": "#/components/schemas/AiOperationFailedPayload"
5057
+ "counts": {
5058
+ "$ref": "#/components/schemas/AccountImportCounts"
5059
+ },
5060
+ "reason": {
5061
+ "type": "string",
5062
+ "nullable": true,
5063
+ "description": "`account.import.failed` only."
5054
5064
  }
5055
5065
  }
5056
5066
  },
5057
- "PaymentCompletedEvent": {
5067
+ "AccountImportStartedEvent": {
5068
+ "type": "object",
5069
+ "required": [
5070
+ "event",
5071
+ "eventId",
5072
+ "apiVersion",
5073
+ "timestamp",
5074
+ "data"
5075
+ ],
5076
+ "properties": {
5077
+ "event": {
5078
+ "type": "string",
5079
+ "description": "The event name. This field is `event`, not `type`."
5080
+ },
5081
+ "eventId": {
5082
+ "type": "string",
5083
+ "format": "uuid",
5084
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5085
+ },
5086
+ "apiVersion": {
5087
+ "type": "string",
5088
+ "example": "2026-04"
5089
+ },
5090
+ "timestamp": {
5091
+ "type": "string",
5092
+ "format": "date-time",
5093
+ "description": "When this delivery was built."
5094
+ },
5095
+ "account": {
5096
+ "$ref": "#/components/schemas/WebhookEventAccount"
5097
+ },
5098
+ "data": {
5099
+ "$ref": "#/components/schemas/AccountImportStartedPayload"
5100
+ }
5101
+ },
5102
+ "description": "An account import began."
5103
+ },
5104
+ "AccountImportCompletedEvent": {
5105
+ "type": "object",
5106
+ "required": [
5107
+ "event",
5108
+ "eventId",
5109
+ "apiVersion",
5110
+ "timestamp",
5111
+ "data"
5112
+ ],
5113
+ "properties": {
5114
+ "event": {
5115
+ "type": "string",
5116
+ "description": "The event name. This field is `event`, not `type`."
5117
+ },
5118
+ "eventId": {
5119
+ "type": "string",
5120
+ "format": "uuid",
5121
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5122
+ },
5123
+ "apiVersion": {
5124
+ "type": "string",
5125
+ "example": "2026-04"
5126
+ },
5127
+ "timestamp": {
5128
+ "type": "string",
5129
+ "format": "date-time",
5130
+ "description": "When this delivery was built."
5131
+ },
5132
+ "account": {
5133
+ "$ref": "#/components/schemas/WebhookEventAccount"
5134
+ },
5135
+ "data": {
5136
+ "$ref": "#/components/schemas/AccountImportFinishedPayload"
5137
+ }
5138
+ },
5139
+ "description": "Every stage of an account import finished. Its data is readable through the API."
5140
+ },
5141
+ "AccountImportFailedEvent": {
5142
+ "type": "object",
5143
+ "required": [
5144
+ "event",
5145
+ "eventId",
5146
+ "apiVersion",
5147
+ "timestamp",
5148
+ "data"
5149
+ ],
5150
+ "properties": {
5151
+ "event": {
5152
+ "type": "string",
5153
+ "description": "The event name. This field is `event`, not `type`."
5154
+ },
5155
+ "eventId": {
5156
+ "type": "string",
5157
+ "format": "uuid",
5158
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5159
+ },
5160
+ "apiVersion": {
5161
+ "type": "string",
5162
+ "example": "2026-04"
5163
+ },
5164
+ "timestamp": {
5165
+ "type": "string",
5166
+ "format": "date-time",
5167
+ "description": "When this delivery was built."
5168
+ },
5169
+ "account": {
5170
+ "$ref": "#/components/schemas/WebhookEventAccount"
5171
+ },
5172
+ "data": {
5173
+ "$ref": "#/components/schemas/AccountImportFinishedPayload"
5174
+ }
5175
+ },
5176
+ "description": "An account import stopped before finishing; `data.reason` says why."
5177
+ },
5178
+ "ConnectSessionCompletedEvent": {
5179
+ "type": "object",
5180
+ "required": [
5181
+ "event",
5182
+ "eventId",
5183
+ "apiVersion",
5184
+ "timestamp",
5185
+ "data"
5186
+ ],
5187
+ "properties": {
5188
+ "event": {
5189
+ "type": "string",
5190
+ "description": "The event name. This field is `event`, not `type`."
5191
+ },
5192
+ "eventId": {
5193
+ "type": "string",
5194
+ "format": "uuid",
5195
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5196
+ },
5197
+ "apiVersion": {
5198
+ "type": "string",
5199
+ "example": "2026-04"
5200
+ },
5201
+ "timestamp": {
5202
+ "type": "string",
5203
+ "format": "date-time",
5204
+ "description": "When this delivery was built."
5205
+ },
5206
+ "account": {
5207
+ "$ref": "#/components/schemas/WebhookEventAccount"
5208
+ },
5209
+ "data": {
5210
+ "$ref": "#/components/schemas/ConnectSessionCompletedPayload"
5211
+ }
5212
+ }
5213
+ },
5214
+ "AccountDisconnectedEvent": {
5215
+ "type": "object",
5216
+ "required": [
5217
+ "event",
5218
+ "eventId",
5219
+ "apiVersion",
5220
+ "timestamp",
5221
+ "data"
5222
+ ],
5223
+ "properties": {
5224
+ "event": {
5225
+ "type": "string",
5226
+ "description": "The event name. This field is `event`, not `type`."
5227
+ },
5228
+ "eventId": {
5229
+ "type": "string",
5230
+ "format": "uuid",
5231
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5232
+ },
5233
+ "apiVersion": {
5234
+ "type": "string",
5235
+ "example": "2026-04"
5236
+ },
5237
+ "timestamp": {
5238
+ "type": "string",
5239
+ "format": "date-time",
5240
+ "description": "When this delivery was built."
5241
+ },
5242
+ "account": {
5243
+ "$ref": "#/components/schemas/WebhookEventAccount"
5244
+ },
5245
+ "data": {
5246
+ "$ref": "#/components/schemas/AccountDisconnectedPayload"
5247
+ }
5248
+ }
5249
+ },
5250
+ "ReviewCreatedEvent": {
5251
+ "type": "object",
5252
+ "required": [
5253
+ "event",
5254
+ "eventId",
5255
+ "apiVersion",
5256
+ "timestamp",
5257
+ "data"
5258
+ ],
5259
+ "properties": {
5260
+ "event": {
5261
+ "type": "string",
5262
+ "description": "The event name. This field is `event`, not `type`."
5263
+ },
5264
+ "eventId": {
5265
+ "type": "string",
5266
+ "format": "uuid",
5267
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5268
+ },
5269
+ "apiVersion": {
5270
+ "type": "string",
5271
+ "example": "2026-04"
5272
+ },
5273
+ "timestamp": {
5274
+ "type": "string",
5275
+ "format": "date-time",
5276
+ "description": "When this delivery was built."
5277
+ },
5278
+ "account": {
5279
+ "$ref": "#/components/schemas/WebhookEventAccount"
5280
+ },
5281
+ "data": {
5282
+ "$ref": "#/components/schemas/ReviewCreatedPayload"
5283
+ }
5284
+ }
5285
+ },
5286
+ "ReviewRespondedEvent": {
5287
+ "type": "object",
5288
+ "required": [
5289
+ "event",
5290
+ "eventId",
5291
+ "apiVersion",
5292
+ "timestamp",
5293
+ "data"
5294
+ ],
5295
+ "properties": {
5296
+ "event": {
5297
+ "type": "string",
5298
+ "description": "The event name. This field is `event`, not `type`."
5299
+ },
5300
+ "eventId": {
5301
+ "type": "string",
5302
+ "format": "uuid",
5303
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5304
+ },
5305
+ "apiVersion": {
5306
+ "type": "string",
5307
+ "example": "2026-04"
5308
+ },
5309
+ "timestamp": {
5310
+ "type": "string",
5311
+ "format": "date-time",
5312
+ "description": "When this delivery was built."
5313
+ },
5314
+ "account": {
5315
+ "$ref": "#/components/schemas/WebhookEventAccount"
5316
+ },
5317
+ "data": {
5318
+ "$ref": "#/components/schemas/ReviewRespondedPayload"
5319
+ }
5320
+ }
5321
+ },
5322
+ "AiOperationCompletedEvent": {
5323
+ "type": "object",
5324
+ "required": [
5325
+ "event",
5326
+ "eventId",
5327
+ "apiVersion",
5328
+ "timestamp",
5329
+ "data"
5330
+ ],
5331
+ "properties": {
5332
+ "event": {
5333
+ "type": "string",
5334
+ "description": "The event name. This field is `event`, not `type`."
5335
+ },
5336
+ "eventId": {
5337
+ "type": "string",
5338
+ "format": "uuid",
5339
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5340
+ },
5341
+ "apiVersion": {
5342
+ "type": "string",
5343
+ "example": "2026-04"
5344
+ },
5345
+ "timestamp": {
5346
+ "type": "string",
5347
+ "format": "date-time",
5348
+ "description": "When this delivery was built."
5349
+ },
5350
+ "account": {
5351
+ "$ref": "#/components/schemas/WebhookEventAccount"
5352
+ },
5353
+ "data": {
5354
+ "$ref": "#/components/schemas/AiOperationCompletedPayload"
5355
+ }
5356
+ }
5357
+ },
5358
+ "AiOperationFailedEvent": {
5359
+ "type": "object",
5360
+ "required": [
5361
+ "event",
5362
+ "eventId",
5363
+ "apiVersion",
5364
+ "timestamp",
5365
+ "data"
5366
+ ],
5367
+ "properties": {
5368
+ "event": {
5369
+ "type": "string",
5370
+ "description": "The event name. This field is `event`, not `type`."
5371
+ },
5372
+ "eventId": {
5373
+ "type": "string",
5374
+ "format": "uuid",
5375
+ "description": "Stable across every delivery and replay of this logical event \u2014 dedupe on it."
5376
+ },
5377
+ "apiVersion": {
5378
+ "type": "string",
5379
+ "example": "2026-04"
5380
+ },
5381
+ "timestamp": {
5382
+ "type": "string",
5383
+ "format": "date-time",
5384
+ "description": "When this delivery was built."
5385
+ },
5386
+ "account": {
5387
+ "$ref": "#/components/schemas/WebhookEventAccount"
5388
+ },
5389
+ "data": {
5390
+ "$ref": "#/components/schemas/AiOperationFailedPayload"
5391
+ }
5392
+ }
5393
+ },
5394
+ "PaymentCompletedEvent": {
5058
5395
  "type": "object",
5059
5396
  "required": [
5060
5397
  "event",
@@ -5437,6 +5774,15 @@
5437
5774
  {
5438
5775
  "$ref": "#/components/schemas/AccountDisconnectedEvent"
5439
5776
  },
5777
+ {
5778
+ "$ref": "#/components/schemas/AccountImportStartedEvent"
5779
+ },
5780
+ {
5781
+ "$ref": "#/components/schemas/AccountImportCompletedEvent"
5782
+ },
5783
+ {
5784
+ "$ref": "#/components/schemas/AccountImportFailedEvent"
5785
+ },
5440
5786
  {
5441
5787
  "$ref": "#/components/schemas/ReviewCreatedEvent"
5442
5788
  },
@@ -5495,6 +5841,9 @@
5495
5841
  "account.created": "#/components/schemas/AccountCreatedEvent",
5496
5842
  "connect.session.completed": "#/components/schemas/ConnectSessionCompletedEvent",
5497
5843
  "account.disconnected": "#/components/schemas/AccountDisconnectedEvent",
5844
+ "account.import.started": "#/components/schemas/AccountImportStartedEvent",
5845
+ "account.import.completed": "#/components/schemas/AccountImportCompletedEvent",
5846
+ "account.import.failed": "#/components/schemas/AccountImportFailedEvent",
5498
5847
  "review.created": "#/components/schemas/ReviewCreatedEvent",
5499
5848
  "review.responded": "#/components/schemas/ReviewRespondedEvent",
5500
5849
  "ai.operation.completed": "#/components/schemas/AiOperationCompletedEvent",
@@ -7235,6 +7584,248 @@
7235
7584
  }
7236
7585
  }
7237
7586
  },
7587
+ "Transaction": {
7588
+ "type": "object",
7589
+ "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).",
7590
+ "required": [
7591
+ "transactionId",
7592
+ "platform",
7593
+ "isPayout",
7594
+ "fees",
7595
+ "payout"
7596
+ ],
7597
+ "properties": {
7598
+ "transactionId": {
7599
+ "type": "string",
7600
+ "nullable": true,
7601
+ "description": "Stable id of the transaction (the underlying payment id). Upsert on it.",
7602
+ "example": "booking_payout_5463377687_bank_transfer"
7603
+ },
7604
+ "platform": {
7605
+ "type": "string",
7606
+ "nullable": true,
7607
+ "description": "Normalized channel: `airbnb`, `booking` (Booking.com, however connected \u2014 never `booking_extranet`), or `vrbo`.",
7608
+ "example": "booking"
7609
+ },
7610
+ "type": {
7611
+ "type": "string",
7612
+ "nullable": true,
7613
+ "description": "Transaction type: `Payout`, `Reservation`, `Refund`, \u2026",
7614
+ "example": "Payout"
7615
+ },
7616
+ "isPayout": {
7617
+ "type": "boolean",
7618
+ "description": "`true` when this is money that reached the host (a payout)."
7619
+ },
7620
+ "status": {
7621
+ "type": "string",
7622
+ "nullable": true,
7623
+ "description": "Normalized settlement status (`COMPLETED` / `UPCOMING`; the raw value passes through when it maps to neither).",
7624
+ "example": "COMPLETED"
7625
+ },
7626
+ "date": {
7627
+ "type": "string",
7628
+ "nullable": true,
7629
+ "description": "Transaction / payout date (the channel's display form or ISO).",
7630
+ "example": "27 Aug 2026"
7631
+ },
7632
+ "currency": {
7633
+ "type": "string",
7634
+ "nullable": true,
7635
+ "example": "NOK"
7636
+ },
7637
+ "amount": {
7638
+ "type": "number",
7639
+ "nullable": true,
7640
+ "description": "Net amount; for a payout, what the host received.",
7641
+ "example": 18597.12
7642
+ },
7643
+ "grossAmount": {
7644
+ "type": "number",
7645
+ "nullable": true,
7646
+ "description": "Guest-paid gross (payouts).",
7647
+ "example": 22272
7648
+ },
7649
+ "fees": {
7650
+ "type": "object",
7651
+ "required": [
7652
+ "commission",
7653
+ "serviceFee",
7654
+ "processingFee"
7655
+ ],
7656
+ "properties": {
7657
+ "commission": {
7658
+ "type": "number",
7659
+ "nullable": true,
7660
+ "description": "Channel commission deducted.",
7661
+ "example": 3340.8
7662
+ },
7663
+ "serviceFee": {
7664
+ "type": "number",
7665
+ "nullable": true,
7666
+ "description": "Payments service fee deducted.",
7667
+ "example": 334.08
7668
+ },
7669
+ "processingFee": {
7670
+ "type": "number",
7671
+ "nullable": true
7672
+ }
7673
+ }
7674
+ },
7675
+ "payout": {
7676
+ "type": "object",
7677
+ "required": [
7678
+ "payoutId",
7679
+ "payoutDate",
7680
+ "paidOutAmount"
7681
+ ],
7682
+ "properties": {
7683
+ "payoutId": {
7684
+ "type": "string",
7685
+ "nullable": true,
7686
+ "description": "Reference of the payout this row belongs to.",
7687
+ "example": "gkvDj0Jm9ZaA6IiO"
7688
+ },
7689
+ "payoutDate": {
7690
+ "type": "string",
7691
+ "nullable": true
7692
+ },
7693
+ "paidOutAmount": {
7694
+ "type": "number",
7695
+ "nullable": true,
7696
+ "description": "On a payout row: the net paid out to the host.",
7697
+ "example": 18597.12
7698
+ },
7699
+ "bankDestination": {
7700
+ "type": "string",
7701
+ "nullable": true,
7702
+ "description": "Masked destination bank account the payout was sent to (Booking.com payouts, from the statement PDF). Null on channels/rows without one.",
7703
+ "example": "NO***********404"
7704
+ },
7705
+ "statementUrl": {
7706
+ "type": "string",
7707
+ "nullable": true,
7708
+ "description": "Repull-hosted download link for the original payout statement PDF (the authoritative settlement record). Add `?format=csv` for the CSV. Served by `GET /v1/transactions/{id}/statement` \u2014 no channel session needed. Null when none is stored."
7709
+ },
7710
+ "statementId": {
7711
+ "type": "string",
7712
+ "nullable": true,
7713
+ "description": "The channel's own numeric statement id (Booking.com, e.g. \"010747030095\"). Null when none.",
7714
+ "example": "010747030095"
7715
+ }
7716
+ }
7717
+ },
7718
+ "confirmationCode": {
7719
+ "type": "string",
7720
+ "nullable": true,
7721
+ "example": "5463377687"
7722
+ },
7723
+ "reservationId": {
7724
+ "type": "integer",
7725
+ "nullable": true
7726
+ },
7727
+ "listingId": {
7728
+ "type": "integer",
7729
+ "nullable": true
7730
+ },
7731
+ "syncedAt": {
7732
+ "type": "string",
7733
+ "format": "date-time",
7734
+ "nullable": true
7735
+ }
7736
+ }
7737
+ },
7738
+ "Resolution": {
7739
+ "type": "object",
7740
+ "description": "An Airbnb Resolution Center case (AirCover / damage, extra-guest, refund or change request). Read-only \u2014 Airbnb exposes no create/evidence/status API. The money a resolution moved rides in the transactions ledger as `Resolution Payout` / `Resolution Adjustment` rows sharing the same reference; join on `resolutionId`.",
7741
+ "required": [
7742
+ "resolutionId",
7743
+ "status"
7744
+ ],
7745
+ "properties": {
7746
+ "resolutionId": {
7747
+ "type": "string",
7748
+ "description": "Airbnb's resolution id \u2014 the `{id}` path value and the join key to a transaction's `reference`.",
7749
+ "example": "CLSF-06464054"
7750
+ },
7751
+ "confirmationCode": {
7752
+ "type": "string",
7753
+ "nullable": true,
7754
+ "description": "Airbnb confirmation code of the reservation the case is on.",
7755
+ "example": "HMZKMYCBC5"
7756
+ },
7757
+ "reservationId": {
7758
+ "type": "integer",
7759
+ "nullable": true,
7760
+ "description": "Repull's internal reservation id, when the reservation is in this workspace."
7761
+ },
7762
+ "listingName": {
7763
+ "type": "string",
7764
+ "nullable": true
7765
+ },
7766
+ "status": {
7767
+ "type": "string",
7768
+ "nullable": true,
7769
+ "description": "OPEN or CLOSED, as Airbnb reports it.",
7770
+ "example": "OPEN"
7771
+ },
7772
+ "reason": {
7773
+ "type": "string",
7774
+ "nullable": true,
7775
+ "description": "Why the resolution was opened."
7776
+ },
7777
+ "caseStatus": {
7778
+ "type": "string",
7779
+ "nullable": true,
7780
+ "description": "Airbnb's case-status label."
7781
+ },
7782
+ "statusText": {
7783
+ "type": "string",
7784
+ "nullable": true,
7785
+ "description": "Human-readable status detail."
7786
+ },
7787
+ "suggestedActionText": {
7788
+ "type": "string",
7789
+ "nullable": true,
7790
+ "description": "Airbnb's hint on whose turn it is to act next \u2014 track progress with it."
7791
+ },
7792
+ "customerSupportInitiated": {
7793
+ "type": "boolean",
7794
+ "nullable": true,
7795
+ "description": "True when Airbnb Customer Support (not the host/guest) opened the case."
7796
+ },
7797
+ "productType": {
7798
+ "type": "string",
7799
+ "nullable": true
7800
+ },
7801
+ "initiator": {
7802
+ "type": "object",
7803
+ "nullable": true,
7804
+ "description": "Who opened the case (id + name)."
7805
+ },
7806
+ "responder": {
7807
+ "type": "object",
7808
+ "nullable": true,
7809
+ "description": "Who responds (id + name)."
7810
+ },
7811
+ "createdAt": {
7812
+ "type": "string",
7813
+ "format": "date-time",
7814
+ "nullable": true
7815
+ },
7816
+ "updatedAt": {
7817
+ "type": "string",
7818
+ "format": "date-time",
7819
+ "nullable": true
7820
+ },
7821
+ "syncedAt": {
7822
+ "type": "string",
7823
+ "format": "date-time",
7824
+ "nullable": true,
7825
+ "description": "When Repull last refreshed this case from Airbnb."
7826
+ }
7827
+ }
7828
+ },
7238
7829
  "AirbnbConnectionHost": {
7239
7830
  "type": "object",
7240
7831
  "description": "One Airbnb host record under the workspace, decorated with its most recent disconnect reason from `airbnb_host_events` (backfill events excluded).",
@@ -37297,6 +37888,557 @@
37297
37888
  }
37298
37889
  }
37299
37890
  }
37891
+ },
37892
+ "/v1/channels/booking/transactions": {
37893
+ "get": {
37894
+ "operationId": "list_booking_transactions",
37895
+ "summary": "List Booking.com transactions (settlement ledger)",
37896
+ "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`.)",
37897
+ "tags": [
37898
+ "Booking.com"
37899
+ ],
37900
+ "parameters": [
37901
+ {
37902
+ "name": "type",
37903
+ "in": "query",
37904
+ "required": false,
37905
+ "description": "Filter by transaction type, e.g. `Payout`, `Reservation`, `Refund`.",
37906
+ "schema": {
37907
+ "type": "string"
37908
+ }
37909
+ },
37910
+ {
37911
+ "name": "status",
37912
+ "in": "query",
37913
+ "required": false,
37914
+ "description": "Filter by raw status.",
37915
+ "schema": {
37916
+ "type": "string"
37917
+ }
37918
+ },
37919
+ {
37920
+ "name": "is_payout",
37921
+ "in": "query",
37922
+ "required": false,
37923
+ "description": "When `true`, only payout rows (money that reached the host).",
37924
+ "schema": {
37925
+ "type": "boolean"
37926
+ }
37927
+ },
37928
+ {
37929
+ "name": "limit",
37930
+ "in": "query",
37931
+ "required": false,
37932
+ "description": "Page size (default 100, max 500).",
37933
+ "schema": {
37934
+ "type": "integer",
37935
+ "minimum": 1,
37936
+ "maximum": 500
37937
+ }
37938
+ },
37939
+ {
37940
+ "name": "cursor",
37941
+ "in": "query",
37942
+ "required": false,
37943
+ "description": "Opaque pagination cursor from a previous `pagination.nextCursor`.",
37944
+ "schema": {
37945
+ "type": "string"
37946
+ }
37947
+ }
37948
+ ],
37949
+ "responses": {
37950
+ "200": {
37951
+ "description": "A page of Booking.com transactions.",
37952
+ "content": {
37953
+ "application/json": {
37954
+ "schema": {
37955
+ "type": "object",
37956
+ "properties": {
37957
+ "data": {
37958
+ "type": "array",
37959
+ "items": {
37960
+ "$ref": "#/components/schemas/Transaction"
37961
+ }
37962
+ },
37963
+ "pagination": {
37964
+ "$ref": "#/components/schemas/CursorPagination"
37965
+ }
37966
+ }
37967
+ }
37968
+ }
37969
+ }
37970
+ }
37971
+ }
37972
+ }
37973
+ },
37974
+ "/v1/transactions": {
37975
+ "get": {
37976
+ "operationId": "list_transactions",
37977
+ "summary": "List transactions & payments (unified ledger)",
37978
+ "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.",
37979
+ "tags": [
37980
+ "Transactions"
37981
+ ],
37982
+ "parameters": [
37983
+ {
37984
+ "name": "platform",
37985
+ "in": "query",
37986
+ "required": false,
37987
+ "description": "Filter to one channel: `airbnb`, `booking` (Booking.com, however connected), or `vrbo`. Omit for all channels.",
37988
+ "schema": {
37989
+ "type": "string",
37990
+ "enum": [
37991
+ "airbnb",
37992
+ "booking",
37993
+ "vrbo"
37994
+ ]
37995
+ }
37996
+ },
37997
+ {
37998
+ "name": "type",
37999
+ "in": "query",
38000
+ "required": false,
38001
+ "description": "Filter by transaction type, e.g. `Payout`, `Reservation`, `Refund`.",
38002
+ "schema": {
38003
+ "type": "string"
38004
+ }
38005
+ },
38006
+ {
38007
+ "name": "status",
38008
+ "in": "query",
38009
+ "required": false,
38010
+ "description": "Filter by raw status.",
38011
+ "schema": {
38012
+ "type": "string"
38013
+ }
38014
+ },
38015
+ {
38016
+ "name": "is_payout",
38017
+ "in": "query",
38018
+ "required": false,
38019
+ "description": "When `true`, only payout rows (money that reached the host).",
38020
+ "schema": {
38021
+ "type": "boolean"
38022
+ }
38023
+ },
38024
+ {
38025
+ "name": "limit",
38026
+ "in": "query",
38027
+ "required": false,
38028
+ "description": "Page size (default 100, max 500).",
38029
+ "schema": {
38030
+ "type": "integer",
38031
+ "minimum": 1,
38032
+ "maximum": 500
38033
+ }
38034
+ },
38035
+ {
38036
+ "name": "cursor",
38037
+ "in": "query",
38038
+ "required": false,
38039
+ "description": "Opaque pagination cursor from a previous `pagination.nextCursor`.",
38040
+ "schema": {
38041
+ "type": "string"
38042
+ }
38043
+ }
38044
+ ],
38045
+ "responses": {
38046
+ "200": {
38047
+ "description": "A page of transactions.",
38048
+ "content": {
38049
+ "application/json": {
38050
+ "schema": {
38051
+ "type": "object",
38052
+ "properties": {
38053
+ "data": {
38054
+ "type": "array",
38055
+ "items": {
38056
+ "$ref": "#/components/schemas/Transaction"
38057
+ }
38058
+ },
38059
+ "pagination": {
38060
+ "$ref": "#/components/schemas/CursorPagination"
38061
+ }
38062
+ }
38063
+ }
38064
+ }
38065
+ }
38066
+ }
38067
+ }
38068
+ }
38069
+ },
38070
+ "/v1/transactions/{id}/statement": {
38071
+ "get": {
38072
+ "operationId": "get_transaction_statement",
38073
+ "summary": "Download the original payout statement",
38074
+ "description": "Downloads the channel's ORIGINAL payout statement \u2014 the authoritative settlement record a host reconciles against \u2014 for a payout transaction. `{id}` is the payout `transactionId` (e.g. `booking_payout_5463377687_bank_transfer`). Repull serves the stored bytes itself (no channel session), so unlike the channel's own link it never expires or leaks a session. PDF by default; pass `?format=csv` for the CSV remittance. Returns `404` when no statement was captured for the payout (e.g. an upcoming payout, or a channel that has none).",
38075
+ "tags": [
38076
+ "Transactions"
38077
+ ],
38078
+ "parameters": [
38079
+ {
38080
+ "$ref": "#/components/parameters/XSchemaHeader"
38081
+ },
38082
+ {
38083
+ "name": "id",
38084
+ "in": "path",
38085
+ "required": true,
38086
+ "description": "The payout transaction id (`transactionId`).",
38087
+ "schema": {
38088
+ "type": "string"
38089
+ }
38090
+ },
38091
+ {
38092
+ "name": "format",
38093
+ "in": "query",
38094
+ "required": false,
38095
+ "description": "Statement format.",
38096
+ "schema": {
38097
+ "type": "string",
38098
+ "enum": [
38099
+ "pdf",
38100
+ "csv"
38101
+ ],
38102
+ "default": "pdf"
38103
+ }
38104
+ }
38105
+ ],
38106
+ "responses": {
38107
+ "200": {
38108
+ "description": "The statement file (PDF by default, or CSV).",
38109
+ "content": {
38110
+ "application/pdf": {
38111
+ "schema": {
38112
+ "type": "string",
38113
+ "format": "binary"
38114
+ }
38115
+ },
38116
+ "text/csv": {
38117
+ "schema": {
38118
+ "type": "string"
38119
+ }
38120
+ }
38121
+ }
38122
+ },
38123
+ "400": {
38124
+ "$ref": "#/components/responses/BadRequest"
38125
+ },
38126
+ "401": {
38127
+ "$ref": "#/components/responses/Unauthorized"
38128
+ },
38129
+ "404": {
38130
+ "$ref": "#/components/responses/NotFound"
38131
+ },
38132
+ "500": {
38133
+ "$ref": "#/components/responses/InternalError"
38134
+ }
38135
+ }
38136
+ }
38137
+ },
38138
+ "/v1/channels/airbnb/resolutions": {
38139
+ "get": {
38140
+ "operationId": "list_airbnb_resolutions",
38141
+ "summary": "List Airbnb Resolution Center cases",
38142
+ "description": "The host's Airbnb Resolution Center cases (AirCover / damage, extra-guest, refund and change requests), open and closed. Served from the database; `POST` this path to refresh from Airbnb. READ-ONLY upstream \u2014 Airbnb's Resolutions API is read-only; a claim is created, evidence added and status changed only in Airbnb's Resolution Center UI, not via API. Use this for visibility and action tracking (`suggestedActionText`). The money a resolution moved is in the transactions ledger as `Resolution Payout` / `Resolution Adjustment` rows sharing the same reference \u2014 join on `resolutionId`. Cursor-paginated, newest first.",
38143
+ "tags": [
38144
+ "Resolutions"
38145
+ ],
38146
+ "parameters": [
38147
+ {
38148
+ "$ref": "#/components/parameters/XSchemaHeader"
38149
+ },
38150
+ {
38151
+ "name": "status",
38152
+ "in": "query",
38153
+ "required": false,
38154
+ "description": "Filter by lifecycle: `open` (still needs action) or `closed` (settled). Omit for all.",
38155
+ "schema": {
38156
+ "type": "string",
38157
+ "enum": [
38158
+ "open",
38159
+ "closed"
38160
+ ]
38161
+ }
38162
+ },
38163
+ {
38164
+ "name": "limit",
38165
+ "in": "query",
38166
+ "required": false,
38167
+ "description": "Page size (default 50, max 200).",
38168
+ "schema": {
38169
+ "type": "integer",
38170
+ "minimum": 1,
38171
+ "maximum": 200
38172
+ }
38173
+ },
38174
+ {
38175
+ "name": "cursor",
38176
+ "in": "query",
38177
+ "required": false,
38178
+ "description": "Opaque pagination cursor from a previous `pagination.nextCursor`.",
38179
+ "schema": {
38180
+ "type": "string"
38181
+ }
38182
+ }
38183
+ ],
38184
+ "responses": {
38185
+ "200": {
38186
+ "description": "Resolutions",
38187
+ "content": {
38188
+ "application/json": {
38189
+ "schema": {
38190
+ "type": "object",
38191
+ "required": [
38192
+ "data",
38193
+ "pagination"
38194
+ ],
38195
+ "properties": {
38196
+ "data": {
38197
+ "type": "array",
38198
+ "items": {
38199
+ "$ref": "#/components/schemas/Resolution"
38200
+ }
38201
+ },
38202
+ "pagination": {
38203
+ "$ref": "#/components/schemas/Pagination"
38204
+ }
38205
+ }
38206
+ }
38207
+ }
38208
+ }
38209
+ },
38210
+ "401": {
38211
+ "$ref": "#/components/responses/Unauthorized"
38212
+ },
38213
+ "422": {
38214
+ "$ref": "#/components/responses/UnprocessableEntity"
38215
+ },
38216
+ "500": {
38217
+ "$ref": "#/components/responses/InternalError"
38218
+ }
38219
+ }
38220
+ },
38221
+ "post": {
38222
+ "operationId": "refresh_airbnb_resolutions",
38223
+ "summary": "Refresh Airbnb resolutions from Airbnb",
38224
+ "description": "Pulls the latest Resolution Center cases from Airbnb (read-only) and stores them, then read with GET. Optionally scope to one `account_id` and/or `status`.",
38225
+ "tags": [
38226
+ "Resolutions"
38227
+ ],
38228
+ "parameters": [
38229
+ {
38230
+ "$ref": "#/components/parameters/XSchemaHeader"
38231
+ }
38232
+ ],
38233
+ "requestBody": {
38234
+ "required": false,
38235
+ "content": {
38236
+ "application/json": {
38237
+ "schema": {
38238
+ "type": "object",
38239
+ "properties": {
38240
+ "account_id": {
38241
+ "type": "string",
38242
+ "description": "Limit the refresh to one Airbnb host id. Omit for all connected accounts."
38243
+ },
38244
+ "status": {
38245
+ "type": "string",
38246
+ "enum": [
38247
+ "OPEN",
38248
+ "CLOSED"
38249
+ ],
38250
+ "description": "Limit the refresh to one lifecycle. Omit for all."
38251
+ }
38252
+ }
38253
+ }
38254
+ }
38255
+ }
38256
+ },
38257
+ "responses": {
38258
+ "200": {
38259
+ "description": "Refresh outcome.",
38260
+ "content": {
38261
+ "application/json": {
38262
+ "schema": {
38263
+ "type": "object",
38264
+ "required": [
38265
+ "synced",
38266
+ "count",
38267
+ "accounts"
38268
+ ],
38269
+ "properties": {
38270
+ "synced": {
38271
+ "type": "boolean"
38272
+ },
38273
+ "count": {
38274
+ "type": "integer",
38275
+ "description": "Resolutions upserted across all accounts."
38276
+ },
38277
+ "accounts": {
38278
+ "type": "array",
38279
+ "items": {
38280
+ "type": "object",
38281
+ "required": [
38282
+ "account_id",
38283
+ "count"
38284
+ ],
38285
+ "properties": {
38286
+ "account_id": {
38287
+ "type": "string"
38288
+ },
38289
+ "count": {
38290
+ "type": "integer"
38291
+ },
38292
+ "error": {
38293
+ "type": "object",
38294
+ "nullable": true,
38295
+ "properties": {
38296
+ "code": {
38297
+ "type": "string"
38298
+ },
38299
+ "message": {
38300
+ "type": "string"
38301
+ }
38302
+ }
38303
+ }
38304
+ }
38305
+ }
38306
+ }
38307
+ }
38308
+ }
38309
+ }
38310
+ }
38311
+ },
38312
+ "401": {
38313
+ "$ref": "#/components/responses/Unauthorized"
38314
+ },
38315
+ "404": {
38316
+ "$ref": "#/components/responses/NotFound"
38317
+ },
38318
+ "422": {
38319
+ "$ref": "#/components/responses/UnprocessableEntity"
38320
+ },
38321
+ "500": {
38322
+ "$ref": "#/components/responses/InternalError"
38323
+ }
38324
+ }
38325
+ }
38326
+ },
38327
+ "/v1/channels/airbnb/resolutions/{id}": {
38328
+ "get": {
38329
+ "operationId": "get_airbnb_resolution",
38330
+ "summary": "Get an Airbnb Resolution Center case",
38331
+ "description": "One Airbnb Resolution Center case. `{id}` is the Airbnb resolution id (the `resolutionId` from the list, also a transaction's `reference`). Read-only (see the list endpoint). The amounts moved are in the transactions ledger \u2014 join `resolutionId` to a transaction's `reference`. 404 when it isn't in this workspace (POST the list endpoint to refresh first).",
38332
+ "tags": [
38333
+ "Resolutions"
38334
+ ],
38335
+ "parameters": [
38336
+ {
38337
+ "$ref": "#/components/parameters/XSchemaHeader"
38338
+ },
38339
+ {
38340
+ "name": "id",
38341
+ "in": "path",
38342
+ "required": true,
38343
+ "description": "The Airbnb resolution id.",
38344
+ "schema": {
38345
+ "type": "string"
38346
+ }
38347
+ }
38348
+ ],
38349
+ "responses": {
38350
+ "200": {
38351
+ "description": "Resolution",
38352
+ "content": {
38353
+ "application/json": {
38354
+ "schema": {
38355
+ "$ref": "#/components/schemas/Resolution"
38356
+ }
38357
+ }
38358
+ }
38359
+ },
38360
+ "401": {
38361
+ "$ref": "#/components/responses/Unauthorized"
38362
+ },
38363
+ "404": {
38364
+ "$ref": "#/components/responses/NotFound"
38365
+ },
38366
+ "500": {
38367
+ "$ref": "#/components/responses/InternalError"
38368
+ }
38369
+ }
38370
+ }
38371
+ },
38372
+ "/v1/connections/{id}/imports": {
38373
+ "get": {
38374
+ "operationId": "listConnectionImports",
38375
+ "summary": "List a connection's imports",
38376
+ "description": "The import runs of one connected account, newest first: the first sync after connecting, a room or unit mapped later, a reconnect, a re-sync. Each run says where it stands (`running`, `completed`, `failed`), its stages and what it imported.\n\nTo know when an account's first sync is done, wait for the `account.import.completed` webhook, or poll this endpoint (or `GET /v1/connect`, whose connections carry their latest `import`) until the newest run is no longer `running`.\n\nAuth: a Repull API key, or a Connect session token (`sessionId`).",
38377
+ "tags": [
38378
+ "Connections"
38379
+ ],
38380
+ "parameters": [
38381
+ {
38382
+ "name": "id",
38383
+ "in": "path",
38384
+ "required": true,
38385
+ "schema": {
38386
+ "type": "string"
38387
+ },
38388
+ "description": "Connection handle `{provider}:{externalAccountId}`, e.g. `booking_extranet:36`, `vrbo:12`, `airbnb:1234567`, `hostaway:27434` \u2014 the `provider` and `externalAccountId` of a connection on `GET /v1/connect`, or the account of an `account.*` webhook."
38389
+ },
38390
+ {
38391
+ "name": "limit",
38392
+ "in": "query",
38393
+ "required": false,
38394
+ "schema": {
38395
+ "type": "integer",
38396
+ "minimum": 1,
38397
+ "maximum": 100,
38398
+ "default": 20
38399
+ },
38400
+ "description": "How many runs to return, newest first."
38401
+ },
38402
+ {
38403
+ "name": "sessionId",
38404
+ "in": "query",
38405
+ "required": false,
38406
+ "schema": {
38407
+ "type": "string"
38408
+ },
38409
+ "description": "The Connect session ID (capability token)."
38410
+ }
38411
+ ],
38412
+ "responses": {
38413
+ "200": {
38414
+ "description": "Imports, newest first. Empty when the account has none recorded.",
38415
+ "content": {
38416
+ "application/json": {
38417
+ "schema": {
38418
+ "type": "object",
38419
+ "properties": {
38420
+ "data": {
38421
+ "type": "array",
38422
+ "items": {
38423
+ "$ref": "#/components/schemas/AccountImport"
38424
+ }
38425
+ },
38426
+ "pagination": {
38427
+ "$ref": "#/components/schemas/Pagination"
38428
+ }
38429
+ }
38430
+ }
38431
+ }
38432
+ }
38433
+ },
38434
+ "400": {
38435
+ "$ref": "#/components/responses/BadRequest"
38436
+ },
38437
+ "401": {
38438
+ "$ref": "#/components/responses/Unauthorized"
38439
+ }
38440
+ }
38441
+ }
37300
38442
  }
37301
38443
  }
37302
38444
  }