repull 0.2.59 → 0.2.61

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 (30) hide show
  1. checksums.yaml +4 -4
  2. data/lib/repull/api/airbnb_api.rb +17 -17
  3. data/lib/repull/api/connect_api.rb +10 -10
  4. data/lib/repull/api/connections_api.rb +4 -4
  5. data/lib/repull/api/reviews_api.rb +4 -4
  6. data/lib/repull/models/account_import.rb +1 -1
  7. data/lib/repull/models/airbnb_data_freshness.rb +1 -1
  8. data/lib/repull/models/airbnb_reservation.rb +346 -6
  9. data/lib/repull/models/airbnb_reservation_detail.rb +679 -0
  10. data/lib/repull/models/airbnb_reservation_detail_response.rb +173 -0
  11. data/lib/repull/models/airbnb_transaction.rb +1 -1
  12. data/lib/repull/models/airbnb_transaction_payout.rb +2 -2
  13. data/lib/repull/models/connect_provider_session.rb +266 -0
  14. data/lib/repull/models/connect_status.rb +12 -1
  15. data/lib/repull/models/connection.rb +16 -5
  16. data/lib/repull/models/create_connect_session_request.rb +2 -2
  17. data/lib/repull/models/create_connection_request.rb +3 -2
  18. data/lib/repull/models/create_price_labs_key201_response.rb +12 -1
  19. data/lib/repull/models/guest.rb +4 -2
  20. data/lib/repull/models/hospitable_webhook.rb +218 -0
  21. data/lib/repull/models/review.rb +1 -1
  22. data/lib/repull/models/start_connection_import202_response_data.rb +32 -6
  23. data/lib/repull/models/start_connection_import_request.rb +3 -5
  24. data/lib/repull/models/submit_hospitable_credentials200_response.rb +169 -0
  25. data/lib/repull/models/sync_airbnb_transactions200_response_accounts_inner.rb +1 -1
  26. data/lib/repull/models/sync_airbnb_transactions_request.rb +1 -1
  27. data/lib/repull/version.rb +1 -1
  28. data/lib/repull.rb +5 -0
  29. data/openapi/v1.json +569 -41
  30. metadata +6 -1
data/openapi/v1.json CHANGED
@@ -1045,13 +1045,17 @@
1045
1045
  },
1046
1046
  "lastStayedAt": {
1047
1047
  "type": "string",
1048
- "format": "date-time",
1049
- "nullable": true
1048
+ "format": "date",
1049
+ "nullable": true,
1050
+ "description": "Check-out date of the guest's most recent stay (YYYY-MM-DD).",
1051
+ "example": "2026-12-06"
1050
1052
  },
1051
1053
  "firstStayedAt": {
1052
1054
  "type": "string",
1053
- "format": "date-time",
1054
- "nullable": true
1055
+ "format": "date",
1056
+ "nullable": true,
1057
+ "description": "Check-in date of the guest's first stay (YYYY-MM-DD).",
1058
+ "example": "2024-01-22"
1055
1059
  },
1056
1060
  "createdAt": {
1057
1061
  "type": "string",
@@ -1719,7 +1723,7 @@
1719
1723
  "type": "string",
1720
1724
  "nullable": true,
1721
1725
  "example": "guesty",
1722
- "description": "The PMS this review was read from (`guesty`, `hostaway`, \u2026) when it came through one \u2014 `platform` is still the channel the guest wrote it on. A reply (`POST /v1/reviews/{id}/reply`) goes through this PMS; `GET /v1/connect/{provider}` \u2192 `capabilities.pms.reviews.reply` says whether it can. `null` for a review from a directly connected channel."
1726
+ "description": "The PMS this review was read from (`guesty`, `hostaway`, `hospitable`, \u2026) when it came through one \u2014 `platform` is still the channel the guest wrote it on, and `reservationId` / `reservationConfirmationCode` point at the stay. A review that also arrives from a directly connected channel is returned once, as the channel's copy (`pms: null`). A reply (`POST /v1/reviews/{id}/reply`) goes through this PMS; `GET /v1/connect/{provider}` \u2192 `capabilities.pms.reviews.reply` says whether it can. `null` for a review from a directly connected channel."
1723
1727
  },
1724
1728
  "listingId": {
1725
1729
  "type": "string",
@@ -1925,6 +1929,56 @@
1925
1929
  }
1926
1930
  ],
1927
1931
  "description": "Apps only: how the app is doing on this connection. `null` once disconnected."
1932
+ },
1933
+ "webhook": {
1934
+ "nullable": true,
1935
+ "allOf": [
1936
+ {
1937
+ "$ref": "#/components/schemas/HospitableWebhook"
1938
+ }
1939
+ ],
1940
+ "description": "Hospitable only: the webhook URL the host pastes into Hospitable (Apps \u2192 Webhooks \u2192 + Add new) and whether deliveries are arriving. Show it in your own UI so the host can set it up. Absent for other providers."
1941
+ }
1942
+ }
1943
+ },
1944
+ "HospitableWebhook": {
1945
+ "type": "object",
1946
+ "description": "Hospitable only. Hospitable has no API to subscribe webhooks, so the host adds one in Hospitable: **Apps \u2192 Webhooks \u2192 + Add new**, pastes `url`, ticks Reservations, Messages, Properties and Reviews, and saves (Hospitable's **Test** button sends a sample right away). Each connection has its own `url`; a reconnect keeps it. Every delivery is checked against Hospitable's signature before it is used.\n\n**Polling.** While `status` is `receiving` the connection is updated from the webhooks alone and is not polled. When it is `not_configured` or `stale` it is polled every minute, and the first poll after going stale re-reads the whole silent window, so nothing is lost. A quiet account (no bookings or messages for a day) can read `stale` while its webhook still works; the next delivery flips it back to `receiving`.",
1947
+ "required": [
1948
+ "url",
1949
+ "status",
1950
+ "lastReceivedAt"
1951
+ ],
1952
+ "properties": {
1953
+ "url": {
1954
+ "type": "string",
1955
+ "format": "uri",
1956
+ "description": "The webhook URL to paste into Hospitable. Unique to this connection.",
1957
+ "example": "https://api.repull.dev/webhooks/pms/hospitable?token=4f9c2a7e1b3d5f60a8c9e2b4d6f8a0c1"
1958
+ },
1959
+ "status": {
1960
+ "type": "string",
1961
+ "description": "`not_configured`: no delivery yet (the host has not added the URL). `receiving`: a delivery arrived in the last 24 hours. `stale`: deliveries arrived before, none in the last 24 hours.",
1962
+ "example": "receiving"
1963
+ },
1964
+ "lastReceivedAt": {
1965
+ "type": "string",
1966
+ "format": "date-time",
1967
+ "nullable": true,
1968
+ "description": "When the last verified delivery arrived; `null` before the first."
1969
+ },
1970
+ "events": {
1971
+ "type": "array",
1972
+ "items": {
1973
+ "type": "string"
1974
+ },
1975
+ "description": "The webhook types to tick in Hospitable.",
1976
+ "example": [
1977
+ "Reservations",
1978
+ "Messages",
1979
+ "Properties",
1980
+ "Reviews"
1981
+ ]
1928
1982
  }
1929
1983
  }
1930
1984
  },
@@ -2611,6 +2665,47 @@
2611
2665
  "expiresAt"
2612
2666
  ]
2613
2667
  },
2668
+ "ConnectProviderSession": {
2669
+ "type": "object",
2670
+ "description": "A hosted Connect session for one provider (`POST /v1/connect/{provider}`). Send the user to `url`; every return to your `redirectUrl` carries `status`, `sessionId` and your `state`.",
2671
+ "properties": {
2672
+ "url": {
2673
+ "type": "string",
2674
+ "format": "uri",
2675
+ "description": "The hosted page to send the user to.",
2676
+ "example": "https://connect.repull.dev/cs_8gQrT2v9k3M4nLp7wJxYzAbCdEfGhIjKlMnOp"
2677
+ },
2678
+ "provider": {
2679
+ "type": "string",
2680
+ "example": "airbnb"
2681
+ },
2682
+ "sessionId": {
2683
+ "type": "string",
2684
+ "description": "Also sent back on the redirect (`sessionId=`), in the popup message and in `connect.session.completed`.",
2685
+ "example": "cs_8gQrT2v9k3M4nLp7wJxYzAbCdEfGhIjKlMnOp"
2686
+ },
2687
+ "expiresAt": {
2688
+ "type": "string",
2689
+ "format": "date-time"
2690
+ },
2691
+ "state": {
2692
+ "type": "string",
2693
+ "nullable": true,
2694
+ "description": "Your `state` from the request, echoed; `null` when you sent none."
2695
+ },
2696
+ "workspaceId": {
2697
+ "type": "string",
2698
+ "description": "PriceLabs only, when the request opened a sub-workspace (`workspace.name`).",
2699
+ "example": "1204"
2700
+ }
2701
+ },
2702
+ "required": [
2703
+ "url",
2704
+ "provider",
2705
+ "sessionId",
2706
+ "expiresAt"
2707
+ ]
2708
+ },
2614
2709
  "SelectProviderResponse": {
2615
2710
  "type": "object",
2616
2711
  "description": "Returned by `POST /v1/connect/sessions/{sessionId}/select-provider`. The picker UI navigates the user to `nextUrl` to begin the per-provider handoff.",
@@ -2796,6 +2891,15 @@
2796
2891
  ],
2797
2892
  "description": "PMS connections only: what the app may change in the PMS. Change it with `PATCH /v1/connect/{provider}/write-policy`."
2798
2893
  },
2894
+ "webhook": {
2895
+ "nullable": true,
2896
+ "allOf": [
2897
+ {
2898
+ "$ref": "#/components/schemas/HospitableWebhook"
2899
+ }
2900
+ ],
2901
+ "description": "Hospitable only (`GET /v1/connect/hospitable`): the webhook URL the host pastes into Hospitable (Apps \u2192 Webhooks \u2192 + Add new) and whether deliveries are arriving."
2902
+ },
2799
2903
  "capabilities": {
2800
2904
  "type": "object",
2801
2905
  "description": "PMS providers only. `reservations`: which reservation writes the API performs on this connection's listings \u2014 the connector's support combined with `writePolicy`. `pms`: everything else the API does through this PMS (review replies, request answers, listing content, guests, message channel/attachments, calendar). When `connected` is false, what the connector supports once connected.",
@@ -6581,7 +6685,7 @@
6581
6685
  "reason": {
6582
6686
  "type": "string",
6583
6687
  "nullable": true,
6584
- "description": "`failed` imports only: why it stopped \u2014 e.g. `needs_permissions`, `duplicate_account`, `stalled`."
6688
+ "description": "`failed` imports only: why it stopped \u2014 e.g. `needs_permissions`, `duplicate_account`, `stalled` (stopped reporting progress), `did_not_start` (queued, but no worker picked it up within 10 minutes: start it again with `POST /v1/connections/{id}/imports`), `queue_failed` (could not be queued)."
6585
6689
  },
6586
6690
  "startedAt": {
6587
6691
  "type": "string",
@@ -8397,14 +8501,54 @@
8397
8501
  },
8398
8502
  "AirbnbReservation": {
8399
8503
  "type": "object",
8400
- "description": "An Airbnb reservation as returned by the channel API. Use `confirmationCode` to address it in Airbnb operations.",
8504
+ "description": "An Airbnb reservation as returned by the channel API. Use `confirmationCode` to address it in Airbnb operations, and `reservationId` to open the same stay on `GET /v1/reservations/{id}`. The fields after `payoutCurrency` are the Airbnb record as stored (Airbnb's raw status, amounts as decimal strings, stay datetimes); they are kept for existing integrations.",
8505
+ "required": [
8506
+ "id",
8507
+ "confirmationCode",
8508
+ "reservationId",
8509
+ "listingId",
8510
+ "airbnbListingId",
8511
+ "accountId",
8512
+ "accountName",
8513
+ "status",
8514
+ "checkIn",
8515
+ "checkOut",
8516
+ "guestName",
8517
+ "guestCount",
8518
+ "totalPrice",
8519
+ "currency",
8520
+ "payout",
8521
+ "payoutCurrency"
8522
+ ],
8401
8523
  "properties": {
8524
+ "id": {
8525
+ "type": "string",
8526
+ "description": "This Airbnb record's id in Repull.",
8527
+ "example": "307200"
8528
+ },
8402
8529
  "confirmationCode": {
8403
8530
  "type": "string",
8531
+ "nullable": true,
8532
+ "description": "Airbnb confirmation code.",
8404
8533
  "example": "HMABC12345"
8405
8534
  },
8535
+ "reservationId": {
8536
+ "type": "string",
8537
+ "nullable": true,
8538
+ "description": "The same stay on the unified reservations API: `GET /v1/reservations/{id}`. Null only while that record is still being created.",
8539
+ "example": "667929"
8540
+ },
8406
8541
  "listingId": {
8407
- "type": "string"
8542
+ "type": "string",
8543
+ "nullable": true,
8544
+ "description": "The Repull listing id (`GET /v1/listings/{id}`).",
8545
+ "example": "42343"
8546
+ },
8547
+ "airbnbListingId": {
8548
+ "type": "string",
8549
+ "nullable": true,
8550
+ "description": "Airbnb's own listing id \u2014 the value `?listing_id=` takes.",
8551
+ "example": "53866721"
8408
8552
  },
8409
8553
  "accountId": {
8410
8554
  "type": "string",
@@ -8420,8 +8564,259 @@
8420
8564
  },
8421
8565
  "status": {
8422
8566
  "type": "string",
8567
+ "nullable": true,
8568
+ "description": "Normalised status. Airbnb's own value is in `airbnbStatus`.",
8423
8569
  "example": "accepted"
8424
8570
  },
8571
+ "checkIn": {
8572
+ "type": "string",
8573
+ "format": "date",
8574
+ "nullable": true,
8575
+ "example": "2026-12-05"
8576
+ },
8577
+ "checkOut": {
8578
+ "type": "string",
8579
+ "format": "date",
8580
+ "nullable": true,
8581
+ "example": "2026-12-08"
8582
+ },
8583
+ "guestName": {
8584
+ "type": "string",
8585
+ "nullable": true
8586
+ },
8587
+ "guestCount": {
8588
+ "type": "integer",
8589
+ "nullable": true
8590
+ },
8591
+ "totalPrice": {
8592
+ "type": "number",
8593
+ "nullable": true,
8594
+ "description": "What the guest paid, in `currency`.",
8595
+ "example": 233.51
8596
+ },
8597
+ "currency": {
8598
+ "type": "string",
8599
+ "nullable": true,
8600
+ "example": "USD"
8601
+ },
8602
+ "payout": {
8603
+ "type": "number",
8604
+ "nullable": true,
8605
+ "description": "What the host is expected to receive, in `payoutCurrency`.",
8606
+ "example": 190.32
8607
+ },
8608
+ "payoutCurrency": {
8609
+ "type": "string",
8610
+ "nullable": true,
8611
+ "example": "USD"
8612
+ },
8613
+ "listingAirbnbId": {
8614
+ "type": "string",
8615
+ "nullable": true,
8616
+ "description": "Internal link id of the Airbnb listing. Use `airbnbListingId` or `listingId` instead.",
8617
+ "deprecated": true
8618
+ },
8619
+ "airbnbReservationId": {
8620
+ "type": "string",
8621
+ "nullable": true,
8622
+ "description": "Same as `confirmationCode`.",
8623
+ "deprecated": true
8624
+ },
8625
+ "hostId": {
8626
+ "type": "string",
8627
+ "nullable": true,
8628
+ "description": "Same as `accountId`.",
8629
+ "deprecated": true
8630
+ },
8631
+ "guestAirbnbId": {
8632
+ "type": "string",
8633
+ "nullable": true,
8634
+ "description": "The guest's Airbnb user id."
8635
+ },
8636
+ "guestFirstName": {
8637
+ "type": "string",
8638
+ "nullable": true
8639
+ },
8640
+ "guestLastName": {
8641
+ "type": "string",
8642
+ "nullable": true
8643
+ },
8644
+ "guestProfilePicture": {
8645
+ "type": "string",
8646
+ "nullable": true
8647
+ },
8648
+ "airbnbStatus": {
8649
+ "type": "string",
8650
+ "nullable": true,
8651
+ "description": "Airbnb's raw status: `accept`, `pending`, `cancelled_by_guest`, `cancelled_by_host`, `cancelled_by_admin`, `deny`, `failed_verification`, `pending_voided`, `checkpoint_voided`, `timeout`, \u2026",
8652
+ "example": "accept"
8653
+ },
8654
+ "cancellationPolicy": {
8655
+ "type": "string",
8656
+ "nullable": true,
8657
+ "example": "moderate"
8658
+ },
8659
+ "cancellationReason": {
8660
+ "type": "string",
8661
+ "nullable": true
8662
+ },
8663
+ "totalPaidAmount": {
8664
+ "type": "string",
8665
+ "nullable": true,
8666
+ "description": "`totalPrice` as a decimal string.",
8667
+ "example": "233.51"
8668
+ },
8669
+ "totalPaidCurrency": {
8670
+ "type": "string",
8671
+ "nullable": true,
8672
+ "example": "USD"
8673
+ },
8674
+ "expectedPayoutAmount": {
8675
+ "type": "string",
8676
+ "nullable": true,
8677
+ "description": "`payout` as a decimal string.",
8678
+ "example": "190.32"
8679
+ },
8680
+ "expectedPayoutCurrency": {
8681
+ "type": "string",
8682
+ "nullable": true,
8683
+ "example": "USD"
8684
+ },
8685
+ "canceledAt": {
8686
+ "type": "string",
8687
+ "format": "date-time",
8688
+ "nullable": true
8689
+ },
8690
+ "createdAt": {
8691
+ "type": "string",
8692
+ "format": "date-time",
8693
+ "nullable": true
8694
+ },
8695
+ "updatedAt": {
8696
+ "type": "string",
8697
+ "format": "date-time",
8698
+ "nullable": true
8699
+ },
8700
+ "checkInDatetime": {
8701
+ "type": "string",
8702
+ "format": "date-time",
8703
+ "nullable": true,
8704
+ "description": "Check-in date at 00:00 UTC. Prefer `checkIn`."
8705
+ },
8706
+ "checkOutDatetime": {
8707
+ "type": "string",
8708
+ "format": "date-time",
8709
+ "nullable": true,
8710
+ "description": "Check-out date at 00:00 UTC. Prefer `checkOut`."
8711
+ },
8712
+ "timeZone": {
8713
+ "type": "string",
8714
+ "nullable": true,
8715
+ "example": "America/Costa_Rica"
8716
+ },
8717
+ "customerId": {
8718
+ "type": "string",
8719
+ "nullable": true,
8720
+ "description": "Your workspace id."
8721
+ },
8722
+ "guestId": {
8723
+ "type": "string",
8724
+ "nullable": true,
8725
+ "description": "The guest on `GET /v1/guests/{id}`."
8726
+ }
8727
+ }
8728
+ },
8729
+ "AirbnbReservationDetail": {
8730
+ "type": "object",
8731
+ "description": "One Airbnb reservation: the unified reservation (the same record as `GET /v1/reservations/{reservationId}`, as stored), the connected account and payout, and `airbnb` \u2014 the row `GET /v1/channels/airbnb/reservations` returns for it.",
8732
+ "required": [
8733
+ "id",
8734
+ "reservationId",
8735
+ "confirmationCode",
8736
+ "listingId",
8737
+ "airbnbListingId",
8738
+ "accountId",
8739
+ "accountName",
8740
+ "status",
8741
+ "checkIn",
8742
+ "checkOut",
8743
+ "guestName",
8744
+ "guestCount",
8745
+ "totalPrice",
8746
+ "currency",
8747
+ "payout",
8748
+ "payoutCurrency",
8749
+ "airbnb"
8750
+ ],
8751
+ "properties": {
8752
+ "id": {
8753
+ "type": "string",
8754
+ "description": "The unified reservation id (same as `reservationId`).",
8755
+ "example": "667929"
8756
+ },
8757
+ "reservationId": {
8758
+ "type": "string",
8759
+ "description": "The unified reservation id: `GET /v1/reservations/{id}`.",
8760
+ "example": "667929"
8761
+ },
8762
+ "confirmationCode": {
8763
+ "type": "string",
8764
+ "example": "HMAS8FEPJM"
8765
+ },
8766
+ "listingId": {
8767
+ "type": "string",
8768
+ "description": "The Repull listing id.",
8769
+ "example": "42343"
8770
+ },
8771
+ "airbnbListingId": {
8772
+ "type": "string",
8773
+ "nullable": true,
8774
+ "description": "Airbnb's own listing id."
8775
+ },
8776
+ "accountId": {
8777
+ "type": "string",
8778
+ "nullable": true,
8779
+ "description": "The connected Airbnb account (host id, as a string)."
8780
+ },
8781
+ "accountName": {
8782
+ "type": "string",
8783
+ "nullable": true
8784
+ },
8785
+ "guestId": {
8786
+ "type": "string",
8787
+ "nullable": true
8788
+ },
8789
+ "platform": {
8790
+ "type": "string",
8791
+ "nullable": true,
8792
+ "example": "airbnb"
8793
+ },
8794
+ "pmsSource": {
8795
+ "type": "string",
8796
+ "nullable": true
8797
+ },
8798
+ "bookingReservationNumber": {
8799
+ "type": "string",
8800
+ "nullable": true
8801
+ },
8802
+ "unitExternalId": {
8803
+ "type": "string",
8804
+ "nullable": true
8805
+ },
8806
+ "unitName": {
8807
+ "type": "string",
8808
+ "nullable": true
8809
+ },
8810
+ "status": {
8811
+ "type": "string",
8812
+ "description": "Airbnb's status as stored on the reservation (`accept`, `cancelled`, `decline`, `pending_voided`, \u2026). The normalised value is `airbnb.status`.",
8813
+ "example": "accept"
8814
+ },
8815
+ "paymentStatus": {
8816
+ "type": "string",
8817
+ "nullable": true,
8818
+ "example": "paid"
8819
+ },
8425
8820
  "checkIn": {
8426
8821
  "type": "string",
8427
8822
  "format": "date"
@@ -8430,6 +8825,12 @@
8430
8825
  "type": "string",
8431
8826
  "format": "date"
8432
8827
  },
8828
+ "guestDetails": {
8829
+ "type": "object",
8830
+ "nullable": true,
8831
+ "description": "Guest counts: `numberOfGuests`, `numberOfAdults`, `numberOfChildren`, `numberOfInfants`, `numberOfPets`.",
8832
+ "additionalProperties": true
8833
+ },
8433
8834
  "guestName": {
8434
8835
  "type": "string",
8435
8836
  "nullable": true
@@ -8439,12 +8840,110 @@
8439
8840
  "nullable": true
8440
8841
  },
8441
8842
  "totalPrice": {
8843
+ "type": "string",
8844
+ "nullable": true,
8845
+ "description": "Total as a decimal string, in `currency`.",
8846
+ "example": "245.03"
8847
+ },
8848
+ "currency": {
8849
+ "type": "string",
8850
+ "nullable": true,
8851
+ "example": "EUR"
8852
+ },
8853
+ "payout": {
8442
8854
  "type": "number",
8855
+ "nullable": true,
8856
+ "description": "What the host is expected to receive, in `payoutCurrency`."
8857
+ },
8858
+ "payoutCurrency": {
8859
+ "type": "string",
8443
8860
  "nullable": true
8444
8861
  },
8445
- "currency": {
8862
+ "priceBreakdown": {
8863
+ "type": "object",
8864
+ "nullable": true,
8865
+ "description": "Nightly rates, fees, taxes, discounts, `hostPayout`.",
8866
+ "additionalProperties": true
8867
+ },
8868
+ "customFields": {
8869
+ "type": "object",
8870
+ "nullable": true,
8871
+ "additionalProperties": true
8872
+ },
8873
+ "cancellationPolicy": {
8874
+ "type": "string",
8875
+ "nullable": true
8876
+ },
8877
+ "cancellationReason": {
8446
8878
  "type": "string",
8447
8879
  "nullable": true
8880
+ },
8881
+ "cancellationDate": {
8882
+ "type": "string",
8883
+ "format": "date-time",
8884
+ "nullable": true
8885
+ },
8886
+ "hostNotes": {
8887
+ "type": "string",
8888
+ "nullable": true
8889
+ },
8890
+ "guestNotes": {
8891
+ "type": "string",
8892
+ "nullable": true
8893
+ },
8894
+ "internalNotes": {
8895
+ "type": "string",
8896
+ "nullable": true
8897
+ },
8898
+ "timeZone": {
8899
+ "type": "string",
8900
+ "nullable": true
8901
+ },
8902
+ "checkInTime": {
8903
+ "type": "string",
8904
+ "nullable": true
8905
+ },
8906
+ "checkOutTime": {
8907
+ "type": "string",
8908
+ "nullable": true
8909
+ },
8910
+ "customerId": {
8911
+ "type": "string",
8912
+ "nullable": true
8913
+ },
8914
+ "airbnbHostId": {
8915
+ "type": "string",
8916
+ "nullable": true,
8917
+ "deprecated": true,
8918
+ "description": "Use `accountId`."
8919
+ },
8920
+ "bookedAt": {
8921
+ "type": "string",
8922
+ "format": "date-time",
8923
+ "nullable": true
8924
+ },
8925
+ "airbnb": {
8926
+ "allOf": [
8927
+ {
8928
+ "$ref": "#/components/schemas/AirbnbReservation"
8929
+ }
8930
+ ],
8931
+ "nullable": true,
8932
+ "description": "The Airbnb record, in the list endpoint's shape. Null only while it is still being imported."
8933
+ }
8934
+ }
8935
+ },
8936
+ "AirbnbReservationDetailResponse": {
8937
+ "type": "object",
8938
+ "required": [
8939
+ "data"
8940
+ ],
8941
+ "properties": {
8942
+ "data": {
8943
+ "$ref": "#/components/schemas/AirbnbReservationDetail"
8944
+ },
8945
+ "dataFreshness": {
8946
+ "$ref": "#/components/schemas/AirbnbDataFreshness"
8448
8947
  }
8449
8948
  }
8450
8949
  },
@@ -9706,7 +10205,7 @@
9706
10205
  "type": "string",
9707
10206
  "format": "date-time",
9708
10207
  "nullable": true,
9709
- "description": "The most recent Airbnb import COMPLETED by any account in scope. `null` when none of them ever has. A run that failed or was rate-limited does not move it."
10208
+ "description": "The most recent Airbnb import COMPLETED by any account in scope \u2014 a full re-read of the account, which runs on connect, about once a day, and on `POST /v1/connections/{id}/imports`. `null` when none of them ever has. A run that failed or was rate-limited does not move it. It is not how current reservations and messages are: Airbnb notifies Repull of every new booking, change, cancellation and message as it happens, and those land within seconds between imports, on every access level."
9710
10209
  },
9711
10210
  "stale": {
9712
10211
  "type": "boolean",
@@ -9786,7 +10285,7 @@
9786
10285
  },
9787
10286
  "status": {
9788
10287
  "type": "string",
9789
- "description": "`COMPLETED`: settled in a payout. `UPCOMING`: expected, not paid out yet."
10288
+ "description": "`COMPLETED`: settled in a payout. `RELEASED`: Airbnb released it (its date has passed) but has not paid it out yet \u2014 the payout is held, or accumulating toward the host's next one; it becomes `COMPLETED` under its payout when paid. `UPCOMING`: expected, not released yet."
9790
10289
  },
9791
10290
  "type": {
9792
10291
  "type": "string",
@@ -9854,7 +10353,7 @@
9854
10353
  "payoutId": {
9855
10354
  "type": "string",
9856
10355
  "nullable": true,
9857
- "description": "The payout this line was settled in (its own id on a Payout row). `null` on an UPCOMING line.",
10356
+ "description": "The payout this line was settled in (its own id on a Payout row). `null` on an unpaid (`RELEASED` / `UPCOMING`) line.",
9858
10357
  "example": "M-HQLLNSWKUWK7R"
9859
10358
  },
9860
10359
  "payoutIdSynthetic": {
@@ -9869,7 +10368,7 @@
9869
10368
  "lineIndex": {
9870
10369
  "type": "integer",
9871
10370
  "nullable": true,
9872
- "description": "Position within the payout, from 1. `null` on the Payout row and on UPCOMING lines."
10371
+ "description": "Position within the payout, from 1. `null` on the Payout row and on unpaid lines."
9873
10372
  },
9874
10373
  "paidOutAmount": {
9875
10374
  "type": "number",
@@ -21441,7 +21940,7 @@
21441
21940
  "get": {
21442
21941
  "operationId": "listReviews",
21443
21942
  "summary": "List reviews",
21444
- "description": "Cursor-paginated guest + host review stream for the workspace. This surface returns the complete cross-channel history \u2014 separate from `/v1/channels/airbnb/reviews` which hits Airbnb live.\n\n`?offset=` is also accepted as a first-class alias for shallow paging (0..10000) \u2014 see the `offset` parameter below. Mutually exclusive with `cursor`.\n\nFilters: `platform` (`airbnb`|`booking`|`vrbo`), `listing_id` (internal Repull listing id), `rating_min` / `rating_max` (inclusive bounds, 0..5), `status` (`responded`|`unanswered`|`all`), `reviewer_role` (`guest` (default) | `host` | `all`).\n\n**Inactive listings:** reviews of inactive listings are left out of the page and of `pagination.total`. Filtering by an inactive `listing_id` returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.",
21943
+ "description": "Cursor-paginated guest + host review stream for the workspace. This surface returns the complete cross-channel history \u2014 separate from `/v1/channels/airbnb/reviews` which hits Airbnb live.\n\n`?offset=` is also accepted as a first-class alias for shallow paging (0..10000) \u2014 see the `offset` parameter below. Mutually exclusive with `cursor`.\n\n**Reviews from a connected PMS** (Guesty, Hostaway, Hospitable) are in the same stream, with `pms` naming the PMS and `platform` the channel the guest wrote on (so `platform=airbnb` includes Airbnb reviews relayed by a PMS). They arrive with the PMS's first import and then within 30 minutes of the PMS receiving them. When the same stay's review comes both from a channel you connected directly and from a PMS, it is returned once: the channel's copy wins.\n\nFilters: `platform` (`airbnb`|`booking`|`vrbo`), `listing_id` (internal Repull listing id), `rating_min` / `rating_max` (inclusive bounds, 0..5), `status` (`responded`|`unanswered`|`all`), `reviewer_role` (`guest` (default) | `host` | `all`).\n\n**Inactive listings:** reviews of inactive listings are left out of the page and of `pagination.total`. Filtering by an inactive `listing_id` returns `403 listing_inactive`. Inactive listings keep syncing; activate the listing to use it here.",
21445
21944
  "tags": [
21446
21945
  "Reviews"
21447
21946
  ],
@@ -21708,12 +22207,12 @@
21708
22207
  "redirectUrl": {
21709
22208
  "type": "string",
21710
22209
  "format": "uri",
21711
- "description": "Where to send the user after they finish (or cancel). Status query params are appended."
22210
+ "description": "Where to send the user after they finish (or cancel). Every return to it carries `status` (`connected`, `cancelled`, `error` with a `code`, `expired`, `pending` when the host chose to finish later, or `requested` for a request-only PMS), `sessionId` (the id this call returns) and `state` when you sent one; a connected return adds `connectionId` and `externalAccountId` (and `hostId` for Airbnb). Your existing query string is kept."
21712
22211
  },
21713
22212
  "state": {
21714
22213
  "type": "string",
21715
22214
  "nullable": true,
21716
- "description": "Your own correlation token, e.g. your user id (at most 500 characters). Echoed in this response, on the redirect back (`&state=`), in the popup message, and in the `connect.session.completed` webhook."
22215
+ "description": "Your own correlation token, e.g. your user id (at most 500 characters). Echoed in this response, on every redirect back (`&state=`, whatever the outcome), in the popup message, and in the `connect.session.completed` webhook. Without it, match the return by `sessionId`."
21717
22216
  },
21718
22217
  "reservationHistoryMonths": {
21719
22218
  "type": "integer",
@@ -21969,7 +22468,7 @@
21969
22468
  "post": {
21970
22469
  "operationId": "create_connection",
21971
22470
  "summary": "Connect to PMS/OTA provider",
21972
- "description": "Establish a connection to a PMS or OTA platform. Credentials vary by provider \u2014 see docs for each provider.\n\nAirbnb-specific: pass `redirectUrl` (where to send the user after consent) and optionally `accessType`. Three tiers: `read_only` grants read-only scopes; `messaging` (shown to hosts as \"Messaging & reviews\") grants read scopes plus message read/send and review writes (reply to guest reviews, submit host reviews \u2014 Airbnb's `reviews_write`) but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; `full_access` \u2014 the default \u2014 grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The response returns a hosted `url` to redirect the user to.\n\nBooking.com: pass `redirectUrl` (no `accessType`). The response returns a hosted `url` \u2014 send the user there to select our connectivity provider in their Booking.com Extranet and paste their Hotel ID. Same response shape as Airbnb (`url`, `sessionId`, `expiresAt`).\n\nPMS providers are not connected by this call: send their credentials to `POST /v1/connect/{provider}/credentials`, or start a hosted session with `POST /v1/connect`.\n\n**PriceLabs (an app).** Pass `redirectUrl` (and optionally `state`, `locale`, `workspace`). The response returns a hosted `url` for the session's workspace: yours, the one `X-Workspace-Id` names, or a new sub-workspace when you send `workspace.name` (its id comes back as `workspaceId`). The page shows the host a key for **every listing of that workspace, including listings added later**, with the steps to paste it into PriceLabs, then waits for PriceLabs' first call and completes like every provider: redirect to `redirectUrl` (`status=connected&connectionId=\u2026`) or the `repull:connect:completed` popup message, and `connect.session.completed`. When PriceLabs first uses the key, `account.created` is sent. To keep PriceLabs away from the rest of an account, put the listings it should price in a sub-workspace and connect PriceLabs there. To issue the key yourself (no hosted page, or only some listings) use `POST /v1/connect/pricelabs/key`.",
22471
+ "description": "Establish a connection to a PMS or OTA platform. Credentials vary by provider \u2014 see docs for each provider.\n\nAirbnb-specific: pass `redirectUrl` (where to send the user after consent) and optionally `accessType`. Three tiers: `read_only` grants read-only scopes; `messaging` (shown to hosts as \"Messaging & reviews\") grants read scopes plus message read/send and review writes (reply to guest reviews, submit host reviews \u2014 Airbnb's `reviews_write`) but NOT property management, so it can coexist with another app (e.g. an existing PMS) that already holds property management on the same Airbnb account; `full_access` \u2014 the default \u2014 grants full host scopes including the exclusive property management (only one app per Airbnb account can hold it). The response returns a hosted `url` to redirect the user to.\n\nBooking.com: pass `redirectUrl` (no `accessType`). The response returns a hosted `url` \u2014 send the user there to select our connectivity provider in their Booking.com Extranet and paste their Hotel ID. Same response shape as Airbnb (`url`, `sessionId`, `expiresAt`, `state`).\n\n**Returning to your app.** Every return to `redirectUrl` carries `status`, `sessionId` and your `state`, whether the host connected, cancelled, hit an error or let the session expire, so you can always tie it back to the call that started it.\n\nPMS providers are not connected by this call: send their credentials to `POST /v1/connect/{provider}/credentials`, or start a hosted session with `POST /v1/connect`.\n\n**PriceLabs (an app).** Pass `redirectUrl` (and optionally `state`, `locale`, `workspace`). The response returns a hosted `url` for the session's workspace: yours, the one `X-Workspace-Id` names, or a new sub-workspace when you send `workspace.name` (its id comes back as `workspaceId`). The page shows the host a key for **every listing of that workspace, including listings added later**, with the steps to paste it into PriceLabs, then waits for PriceLabs' first call and completes like every provider: redirect to `redirectUrl` (`status=connected&connectionId=\u2026`) or the `repull:connect:completed` popup message, and `connect.session.completed`. When PriceLabs first uses the key, `account.created` is sent. To keep PriceLabs away from the rest of an account, put the listings it should price in a sub-workspace and connect PriceLabs there. To issue the key yourself (no hosted page, or only some listings) use `POST /v1/connect/pricelabs/key`.",
21973
22472
  "tags": [
21974
22473
  "Connect"
21975
22474
  ],
@@ -21988,7 +22487,7 @@
21988
22487
  "redirectUrl": {
21989
22488
  "type": "string",
21990
22489
  "format": "uri",
21991
- "description": "Airbnb + Booking.com \u2014 where to redirect the user after they finish the hosted connect flow."
22490
+ "description": "Airbnb, Booking.com and PriceLabs \u2014 where to send the user after they finish (or cancel) the hosted connect flow. Every return to it carries `status` (`connected`, `cancelled`, `error` with a `code`, `expired`, `pending` when the host chose to finish later, or `requested` for a request-only PMS), `sessionId` (the id this call returns) and `state` when you sent one; a connected return adds `connectionId` and `externalAccountId` (and `hostId` for Airbnb). Your existing query string is kept."
21992
22491
  },
21993
22492
  "accessType": {
21994
22493
  "type": "string",
@@ -22009,7 +22508,8 @@
22009
22508
  },
22010
22509
  "state": {
22011
22510
  "type": "string",
22012
- "description": "Airbnb + Booking.com \u2014 your own correlation token, e.g. your user id (at most 500 characters). Echoed on the redirect back (`&state=`) and in the `connect.session.completed` webhook."
22511
+ "nullable": true,
22512
+ "description": "Your own correlation token, e.g. your user id (at most 500 characters), for every hosted flow (Airbnb, Booking.com, PriceLabs). Echoed in this response, on every redirect back (`&state=`, whatever the outcome), in the popup message, and in the `connect.session.completed` webhook. Without it, match the return by `sessionId`."
22013
22513
  },
22014
22514
  "workspace": {
22015
22515
  "type": "object",
@@ -22042,11 +22542,11 @@
22042
22542
  },
22043
22543
  "responses": {
22044
22544
  "200": {
22045
- "description": "Connected",
22545
+ "description": "Hosted session created (Airbnb, Booking.com, PriceLabs): send the user to `url`.",
22046
22546
  "content": {
22047
22547
  "application/json": {
22048
22548
  "schema": {
22049
- "$ref": "#/components/schemas/Connection"
22549
+ "$ref": "#/components/schemas/ConnectProviderSession"
22050
22550
  }
22051
22551
  }
22052
22552
  }
@@ -22351,7 +22851,7 @@
22351
22851
  "post": {
22352
22852
  "operationId": "submitHospitableCredentials",
22353
22853
  "summary": "Submit Hospitable credentials for a Connect session",
22354
- "description": "Completes a credentials-pattern connection for Hospitable. Personal access token from Hospitable \u2192 Settings \u2192 API.\n\nThe credentials are validated against Hospitable before anything is persisted, so an invalid pair returns `invalid_credentials` rather than creating a dead connection. On success the `pms_connections` row is written and the Connect session moves to its terminal state.\n\nNo API key required when called with a `sessionId` \u2014 the session is the capability token.",
22854
+ "description": "Completes a credentials-pattern connection for Hospitable. Personal access token from Hospitable \u2192 Apps \u2192 API access \u2192 Access tokens.\n\nThe credentials are validated against Hospitable before anything is persisted, so an invalid pair returns `invalid_credentials` rather than creating a dead connection. On success the `pms_connections` row is written and the Connect session moves to its terminal state. The response carries the connection's `webhook` URL: Hospitable has no API to subscribe webhooks, so show it to the host, who adds it in Hospitable (Apps \u2192 Webhooks \u2192 + Add new) for instant updates.\n\nNo API key required when called with a `sessionId` \u2014 the session is the capability token.",
22355
22855
  "tags": [
22356
22856
  "Connect"
22357
22857
  ],
@@ -22393,6 +22893,15 @@
22393
22893
  "accountInfo": {
22394
22894
  "type": "object",
22395
22895
  "additionalProperties": true
22896
+ },
22897
+ "webhook": {
22898
+ "nullable": true,
22899
+ "allOf": [
22900
+ {
22901
+ "$ref": "#/components/schemas/HospitableWebhook"
22902
+ }
22903
+ ],
22904
+ "description": "The webhook URL to show the host: in Hospitable, Apps \u2192 Webhooks \u2192 + Add new, paste it, tick Reservations, Messages, Properties and Reviews. Optional \u2014 without it the connection is polled every minute. `null` if it could not be set up."
22396
22905
  }
22397
22906
  }
22398
22907
  }
@@ -23170,7 +23679,7 @@
23170
23679
  "post": {
23171
23680
  "operationId": "replyToReview",
23172
23681
  "summary": "Reply to a review on any channel",
23173
- "description": "Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from.\n\nReplies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name \u2014 the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work.\n\n**Reviews read from a PMS** (`pms` set on the review \u2014 Guesty, Hostaway, \u2026) are answered through that PMS. A PMS whose API has no reply returns `422 pms_write_unsupported` naming it (Hostaway today); `GET /v1/connect/{provider}` \u2192 `capabilities.pms.reviews.reply` says so beforehand. A revoked PMS connection is `403 connection_reauth_required`.\n\nTo review a guest (Airbnb and Vrbo), use `POST /v1/reviews/{id}/guest-review`.\n\n**Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.",
23682
+ "description": "Resolves the review, reads its channel and dispatches the reply. Channel-neutral: you do not need to know where the review came from.\n\nReplies work on Airbnb, Booking.com and VRBO. Each channel accepts one reply per review (VRBO: a second is `409 already_replied`; a review VRBO no longer takes a response to is `409 reply_not_allowed`). On VRBO the response is signed with a name \u2014 the connected account's host name, or `name` if you send it. A review from a channel without a reply API returns `422 unsupported_channel` naming the channels that do work.\n\n**Reviews read from a PMS** (`pms` set on the review \u2014 Guesty, Hostaway, Hospitable, \u2026) are answered through that PMS. Guesty and Hospitable reply on Airbnb and Booking.com reviews; Hospitable takes one response per review while the channel's window is open, and refuses otherwise with `422 pms_rejected` carrying its reason. A PMS whose API has no reply returns `422 pms_write_unsupported` naming it (Hostaway today); `GET /v1/connect/{provider}` \u2192 `capabilities.pms.reviews.reply` says so beforehand. A revoked PMS connection is `403 connection_reauth_required`.\n\nTo review a guest (Airbnb and Vrbo), use `POST /v1/reviews/{id}/guest-review`.\n\n**Inactive listings:** a review of an inactive listing returns `403 listing_inactive` and no reply reaches the channel. Activate the listing first.",
23174
23683
  "tags": [
23175
23684
  "Reviews"
23176
23685
  ],
@@ -25062,7 +25571,7 @@
25062
25571
  "get": {
25063
25572
  "operationId": "list_airbnb_reservations",
25064
25573
  "summary": "List Airbnb reservations",
25065
- "description": "Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away.\n\nWalk pages with `?cursor=<pagination.nextCursor>` until `pagination.hasMore` is `false`. The cursor is opaque \u2014 never construct or parse it client-side.\n\n`?offset=` is also accepted as a first-class alias for shallow paging (0..10000) \u2014 see the `offset` parameter below. Mutually exclusive with `cursor`. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination.\n\nWhen `status` is omitted, all statuses are returned (Airbnb defaults to `accepted` only on its own surface, but this endpoint normalises to \"all\"). Pass `?status=accepted` to scope.\n\nReservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.\n\n**Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.",
25574
+ "description": "Cursor-paginated list of reservations sourced directly from Airbnb. Use this when you need Airbnb-specific fields (guest payout split, cancellation policy snapshot) that the unified `/v1/reservations` endpoint flattens away.\n\nEach row has the Airbnb `confirmationCode`, the `reservationId` of the same stay on `GET /v1/reservations/{id}`, the Repull `listingId` and Airbnb `airbnbListingId`, a normalised `status`, `checkIn`/`checkOut` dates, `totalPrice` + `currency` (what the guest paid) and `payout` + `payoutCurrency` (what the host receives). Airbnb's own record follows (`airbnbStatus`, `totalPaidAmount`, `expectedPayoutAmount`, \u2026) for integrations already reading it.\n\n**Real time.** Airbnb notifies Repull of every new booking, change and cancellation as it happens, on every access level (read-only included): it is here within seconds and fires `reservation.created` / `reservation.updated` / `reservation.cancelled` within about a minute. `dataFreshness.lastSyncedAt` is the last full re-read of the account, not the age of these rows.\n\nWalk pages with `?cursor=<pagination.nextCursor>` until `pagination.hasMore` is `false`. The cursor is opaque \u2014 never construct or parse it client-side.\n\n`?offset=` is also accepted as a first-class alias for shallow paging (0..10000) \u2014 see the `offset` parameter below. Mutually exclusive with `cursor`. Internally this walks upstream Airbnb cursor pages to skip rows, so deep offsets cost N/limit upstream round-trips; cursor remains the better choice for deep pagination.\n\nWhen `status` is omitted, all statuses are returned (Airbnb defaults to `accepted` only on its own surface, but this endpoint normalises to \"all\"). Pass `?status=accepted` to scope.\n\nReservations on inactive listings are left out (counts and cursors included); they keep syncing and reappear once the listing is activated. Filtering by an inactive listing (`listing_id`) returns `403 listing_inactive`.\n\n**Several Airbnb accounts?** A workspace can connect more than one. By default this returns every connected account's rows; pass `?account_id=<airbnb host id>` to scope to one. Every row carries `accountId` + `accountName` either way, and `dataFreshness.accounts[]` reports each account's freshness separately, so one disconnected host no longer marks the whole response stale.",
25066
25575
  "tags": [
25067
25576
  "Airbnb"
25068
25577
  ],
@@ -25112,10 +25621,12 @@
25112
25621
  "cancelled",
25113
25622
  "completed",
25114
25623
  "failed_verification",
25115
- "request_voided"
25624
+ "request_voided",
25625
+ "expired",
25626
+ "error"
25116
25627
  ]
25117
25628
  },
25118
- "description": "Filter by reservation status. Omit to receive all statuses."
25629
+ "description": "Filter by the normalised `status`. `completed` = accepted and already checked out. Airbnb's raw values (`accept`, `cancelled_by_guest`, \u2026) are accepted too. Omit to receive all statuses; an unknown value returns `400 invalid_params`."
25119
25630
  },
25120
25631
  {
25121
25632
  "name": "start_date",
@@ -25156,6 +25667,9 @@
25156
25667
  }
25157
25668
  }
25158
25669
  },
25670
+ "400": {
25671
+ "$ref": "#/components/responses/BadRequest"
25672
+ },
25159
25673
  "403": {
25160
25674
  "$ref": "#/components/responses/ListingInactive"
25161
25675
  },
@@ -25189,7 +25703,7 @@
25189
25703
  "content": {
25190
25704
  "application/json": {
25191
25705
  "schema": {
25192
- "$ref": "#/components/schemas/AirbnbReservation"
25706
+ "$ref": "#/components/schemas/AirbnbReservationDetailResponse"
25193
25707
  }
25194
25708
  }
25195
25709
  }
@@ -26032,7 +26546,7 @@
26032
26546
  "get": {
26033
26547
  "operationId": "list_airbnb_transactions",
26034
26548
  "summary": "List Airbnb transactions (settlement ledger)",
26035
- "description": "The Airbnb settlement ledger for this workspace: every payout Airbnb sent to the host, each followed by the lines it paid \u2014 reservations and their installments, adjustments, resolution payouts and adjustments, cancellation fees. A payout's lines' signed `amount`s sum to its `payout.paidOutAmount` exactly, negative lines included (an adjustment offset against a later payout appears under that payout). `status: UPCOMING` lines are expected earnings not paid out yet; they belong to no payout.\n\n**Ids are stable.** Airbnb sends no line id and no payout id on lines, so Repull derives them deterministically: a Payout row's id is Airbnb's payout id; a line's is `<payoutId>:<type>:<confirmationCode>:<n>`. The same line has the same id on every refresh and every page, so you can upsert on `transactionId`. A payout that nets to $0.00 has no Airbnb id; it gets a derived `Z-<date>-<hash>` id with `payout.payoutIdSynthetic: true`.\n\n**Order:** newest first by the payout's date; each Payout row is followed by its lines in Airbnb's order (`payout.lineIndex`).\n\n**Dates:** `start_date` / `end_date` match the payout's date for settled lines (a line can be dated the day before its payout, and is still returned with it) and the line's own date for UPCOMING lines.\n\n**Pure DB read** \u2014 never calls Airbnb. Refresh with `POST` on this path. `dataFreshness` reports when each account's ledger was last refreshed.\n\nLines on listings that are inactive in Repull are included and flagged `onInactiveListing: true`, so every payout reconciles. Lines Repull cannot match to a reservation keep `reservationId: null`.\n\n**Not in Airbnb's transaction history** (listed in `unavailableFields`): taxes Airbnb collects and remits itself, and the guest-paid total (see the reservation's financial breakdown); pass-through occupancy tax paid to the host does appear, as its own `Pass Through Tot` lines, the original line a refund or reversal reverses (it names the stay and the resolution), and currency-conversion amounts (only the payout currency is reported).",
26549
+ "description": "The Airbnb settlement ledger for this workspace: every payout Airbnb sent to the host, each followed by the lines it paid \u2014 reservations and their installments, adjustments, resolution payouts and adjustments, cancellation fees. A payout's lines' signed `amount`s sum to its `payout.paidOutAmount` exactly, negative lines included (an adjustment offset against a later payout appears under that payout). Lines not paid out yet belong to no payout: `status: RELEASED` lines were released by Airbnb (their date has passed) and are waiting for a payout \u2014 a held payout, or one accumulating toward the host's payout threshold or schedule; `status: UPCOMING` lines are not released yet. When a line is paid it appears as `COMPLETED` under its payout and its unpaid line goes away.\n\n**Ids are stable.** Airbnb sends no line id and no payout id on lines, so Repull derives them deterministically: a Payout row's id is Airbnb's payout id; a line's is `<payoutId>:<type>:<confirmationCode>:<n>`. The same line has the same id on every refresh and every page, so you can upsert on `transactionId`. A payout that nets to $0.00 has no Airbnb id; it gets a derived `Z-<date>-<hash>` id with `payout.payoutIdSynthetic: true`.\n\n**Order:** newest first by the payout's date; each Payout row is followed by its lines in Airbnb's order (`payout.lineIndex`).\n\n**Dates:** `start_date` / `end_date` match the payout's date for settled lines (a line can be dated the day before its payout, and is still returned with it) and the line's own date for UPCOMING lines.\n\n**Pure DB read** \u2014 never calls Airbnb. Refresh with `POST` on this path. `dataFreshness` reports when each account's ledger was last refreshed.\n\nLines on listings that are inactive in Repull are included and flagged `onInactiveListing: true`, so every payout reconciles. Lines Repull cannot match to a reservation keep `reservationId: null`.\n\n**Not in Airbnb's transaction history** (listed in `unavailableFields`): taxes Airbnb collects and remits itself, and the guest-paid total (see the reservation's financial breakdown); pass-through occupancy tax paid to the host does appear, as its own `Pass Through Tot` lines, the original line a refund or reversal reverses (it names the stay and the resolution), and currency-conversion amounts (only the payout currency is reported).",
26036
26550
  "tags": [
26037
26551
  "Airbnb"
26038
26552
  ],
@@ -26044,7 +26558,7 @@
26044
26558
  "name": "start_date",
26045
26559
  "in": "query",
26046
26560
  "required": false,
26047
- "description": "Inclusive lower bound on the payout's date (the line's own date for UPCOMING lines). YYYY-MM-DD.",
26561
+ "description": "Inclusive lower bound on the payout's date (the line's own date for unpaid `RELEASED` / `UPCOMING` lines). YYYY-MM-DD.",
26048
26562
  "schema": {
26049
26563
  "type": "string",
26050
26564
  "format": "date"
@@ -26064,11 +26578,12 @@
26064
26578
  "name": "status",
26065
26579
  "in": "query",
26066
26580
  "required": false,
26067
- "description": "`COMPLETED` (settled) or `UPCOMING` (expected).",
26581
+ "description": "`COMPLETED` (paid out), `RELEASED` (released by Airbnb, not paid out yet) or `UPCOMING` (not released yet).",
26068
26582
  "schema": {
26069
26583
  "type": "string",
26070
26584
  "enum": [
26071
26585
  "COMPLETED",
26586
+ "RELEASED",
26072
26587
  "UPCOMING"
26073
26588
  ]
26074
26589
  }
@@ -26157,7 +26672,7 @@
26157
26672
  "$ref": "#/components/responses/AirbnbAccountNotFound"
26158
26673
  },
26159
26674
  "422": {
26160
- "description": "A filter or body field is malformed (dates are YYYY-MM-DD; status is COMPLETED or UPCOMING).",
26675
+ "description": "A filter or body field is malformed (dates are YYYY-MM-DD; status is COMPLETED, RELEASED or UPCOMING).",
26161
26676
  "content": {
26162
26677
  "application/json": {
26163
26678
  "schema": {
@@ -26174,7 +26689,7 @@
26174
26689
  "post": {
26175
26690
  "operationId": "sync_airbnb_transactions",
26176
26691
  "summary": "Refresh Airbnb transactions",
26177
- "description": "Pull the transaction history from Airbnb into the ledger `GET` serves. Every connected Airbnb account is refreshed, or only `?account_id=`. Without dates: settled lines from the last 12 months and the forecast for the next 12. Safe to repeat: settled lines are upserted on their stable ids, never duplicated or removed; the UPCOMING forecast inside the fetched window is replaced, so a line that has since been paid out moves to its payout. Each account reports its own outcome in `accounts[]`: one account Airbnb refuses (a revoked host, a listing Airbnb no longer serves) is reported there with Airbnb's reason and does not stop the others. When every account fails, the response is Airbnb's answer with its usual code.",
26692
+ "description": "Pull the transaction history from Airbnb into the ledger `GET` serves. Every connected Airbnb account is refreshed, or only `?account_id=`. Without dates: settled lines from the last 12 months, and every line not paid out yet from 12 months back to 12 months ahead \u2014 released lines that are held or accumulating keep their past release date, so the window reaches back for them. Safe to repeat: settled lines are upserted on their stable ids, never duplicated or removed; the unpaid lines inside the fetched window are replaced, so a line that has since been paid out moves to its payout. Each account reports its own outcome in `accounts[]`: one account Airbnb refuses (a revoked host, a listing Airbnb no longer serves) is reported there with Airbnb's reason and does not stop the others. When every account fails, the response is Airbnb's answer with its usual code.",
26178
26693
  "tags": [
26179
26694
  "Airbnb"
26180
26695
  ],
@@ -26206,7 +26721,7 @@
26206
26721
  "COMPLETED",
26207
26722
  "UPCOMING"
26208
26723
  ],
26209
- "description": "Refresh only settled or only upcoming lines. Both when omitted."
26724
+ "description": "Airbnb's two buckets: `COMPLETED` refreshes paid-out lines only, `UPCOMING` every unpaid line (`RELEASED` and `UPCOMING`). Both when omitted."
26210
26725
  }
26211
26726
  }
26212
26727
  }
@@ -26257,7 +26772,7 @@
26257
26772
  },
26258
26773
  "upcomingRemoved": {
26259
26774
  "type": "integer",
26260
- "description": "UPCOMING lines Airbnb no longer lists (paid out or cancelled) and were removed."
26775
+ "description": "Unpaid (RELEASED / UPCOMING) lines Airbnb no longer lists (paid out or cancelled) and were removed."
26261
26776
  },
26262
26777
  "error": {
26263
26778
  "type": "object",
@@ -42515,8 +43030,8 @@
42515
43030
  },
42516
43031
  "post": {
42517
43032
  "operationId": "startConnectionImport",
42518
- "summary": "Refresh a connection's listings",
42519
- "description": "Refresh listings: picks up listings you've added on Airbnb since you connected. Re-reads the connected account's listings now: a new property comes in as a new listing, together with its calendar (pricing and availability), and existing listings are refreshed. On a full-access connection Repull is the source of your calendars, so the calendars of listings already in Repull are not re-read from Airbnb; on read-only and messaging connections they are. Nothing else is re-imported: no reservations, conversations, reviews or payouts.\n\nThe same import runs on its own once a day for every connected Airbnb account, and when the host reconnects. Call this when you know a property was just added and do not want to wait.\n\nNew listings obey your plan's active-listing limit: past it, and when the property is unlisted on Airbnb, they arrive inactive. Existing listings keep their status.\n\nThe import runs in the background (`202`). It is recorded like any other import (trigger `resync`, one `listings` stage): follow it on `GET /v1/connections/{id}/imports` or wait for `account.import.completed`, then read the new listings with `GET /v1/listings`.\n\nAirbnb connections only for now. Returns `409 conflict` while a listings import of the account is already running, and `409 connection_reauth_required` when the account is disconnected.",
43033
+ "summary": "Start an import of a connection",
43034
+ "description": "Start an import of a connected Airbnb account now. Two scopes:\n\n**`full`** \u2014 the import that runs when an account is first connected, again: listings with their calendars (pricing and availability), reservations, then payouts, reviews and conversations. For an account that has never fully imported, e.g. a first import that never started or stalled. Returns `409 conflict` once the account has been fully imported (everything keeps syncing on its own after that).\n\n**`listings`** \u2014 picks up listings you've added on Airbnb since you connected. Re-reads the connected account's listings now: a new property comes in as a new listing, together with its calendar (pricing and availability), and existing listings are refreshed. On a full-access connection Repull is the source of your calendars, so the calendars of listings already in Repull are not re-read from Airbnb; on read-only and messaging connections they are. Nothing else is re-imported. The same import runs on its own once a day for every connected Airbnb account, and when the host reconnects.\n\nWith no body, Repull chooses: `full` for an account that has never fully imported, `listings` otherwise.\n\nNew listings obey your plan's active-listing limit: past it, and when the property is unlisted on Airbnb, they arrive inactive. Existing listings keep their status.\n\nEvery scope runs in the background (`202`) and is recorded like any other import: follow it on `GET /v1/connections/{id}/imports` (`importId`, when returned, is its id there) or wait for `account.import.completed`. An import no worker picks up within 10 minutes ends `failed` with reason `did_not_start` (and `account.import.failed`); call this again. A `full` request also replaces such an import itself (`replacedImportId`).\n\nAirbnb connections only for now. Returns `409 conflict` while an import of the account is already running, and `409 connection_reauth_required` when the account is disconnected.",
42520
43035
  "tags": [
42521
43036
  "Connections"
42522
43037
  ],
@@ -42541,10 +43056,10 @@
42541
43056
  "scope": {
42542
43057
  "type": "string",
42543
43058
  "enum": [
42544
- "listings"
43059
+ "listings",
43060
+ "full"
42545
43061
  ],
42546
- "default": "listings",
42547
- "description": "What to import. `listings` = the account's listings. New listings come in with their calendar (pricing and availability); on a full-access connection, calendars of listings already in Repull are not re-read. The only scope; the full import runs when an account is connected."
43062
+ "description": "What to import. `full` = the first-connect import again (listings, calendars, reservations, payouts, reviews, conversations), for an account that has never fully imported. `listings` = the account's listings with their calendars. Omit to let Repull choose: `full` for an account that has never fully imported, else `listings`."
42548
43063
  }
42549
43064
  }
42550
43065
  }
@@ -42569,7 +43084,8 @@
42569
43084
  "scope": {
42570
43085
  "type": "string",
42571
43086
  "enum": [
42572
- "listings"
43087
+ "listings",
43088
+ "full"
42573
43089
  ]
42574
43090
  },
42575
43091
  "status": {
@@ -42581,13 +43097,25 @@
42581
43097
  "queuedAt": {
42582
43098
  "type": "string",
42583
43099
  "format": "date-time"
43100
+ },
43101
+ "importId": {
43102
+ "type": "string",
43103
+ "nullable": true,
43104
+ "description": "The import's id on `GET /v1/connections/{id}/imports` and in the `account.import.*` webhooks."
43105
+ },
43106
+ "replacedImportId": {
43107
+ "type": "string",
43108
+ "nullable": true,
43109
+ "description": "`full` only: an earlier import of this account that no worker had picked up, closed as `failed` (`did_not_start`) and replaced by this one."
42584
43110
  }
42585
43111
  },
42586
43112
  "required": [
42587
43113
  "connection",
42588
43114
  "scope",
42589
43115
  "status",
42590
- "queuedAt"
43116
+ "queuedAt",
43117
+ "importId",
43118
+ "replacedImportId"
42591
43119
  ]
42592
43120
  }
42593
43121
  }