repull 0.2.20 → 0.2.21

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.
data/openapi/v1.json CHANGED
@@ -4801,7 +4801,7 @@
4801
4801
  "markup": {
4802
4802
  "type": "string",
4803
4803
  "nullable": true,
4804
- "description": "Decimal markup (e.g. \"1.10\" for +10%)."
4804
+ "description": "The Airbnb markup as a fraction: \"0.35\" = +35% on the listing's own price. Read or set it as a percentage with `/v1/listings/{id}/markups`."
4805
4805
  },
4806
4806
  "syncCategory": {
4807
4807
  "type": "string",
@@ -4899,7 +4899,8 @@
4899
4899
  },
4900
4900
  "markup": {
4901
4901
  "type": "string",
4902
- "nullable": true
4902
+ "nullable": true,
4903
+ "description": "The Booking.com markup on this property, as a fraction: \"0.18\" = +18%, shared by every listing on the property. Read or set it as a percentage with `/v1/listings/{id}/markups`."
4903
4904
  },
4904
4905
  "syncCategory": {
4905
4906
  "type": "string",
@@ -12828,8 +12829,8 @@
12828
12829
  "/v1/properties": {
12829
12830
  "get": {
12830
12831
  "operationId": "list_properties",
12831
- "summary": "List properties",
12832
- "description": "Cursor-paginated list of properties for the authenticated workspace. Walk pages with `?cursor=<pagination.nextCursor>`; stop when `pagination.hasMore` is `false`. Cursor is opaque base64 \u2014 do not parse it.\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: `q` (substring on name/street/city), `status` (active|inactive|all), `lifecycle_status` (exact match on the listing's lifecycle state). Other unknown params (e.g. `?search=` or `?propertyId=`) are rejected with 422 \u2014 no silent unfiltered results.\n\n**Incremental sync (only changes since last poll):** pass `?updated_since=<ISO8601>` to receive only properties changed at or after that instant. Each property carries `updatedAt` \u2014 the last row of the final page is your next watermark. `updated_since` changes the page ordering to `updatedAt ASC, id ASC` (and the cursor with it); see the parameter description. `GET /v1/listings` does NOT yet accept `updated_since` \u2014 use this endpoint for property-side incremental sync.\n\n**Inactive properties:** an inactive property keeps syncing, but cannot be read or changed through the API until it is activated. They are only listed when `status` asks for them, and then with `id`, `name`, `status`, `lifecycleStatus`, `channels` and `updatedAt` only \u2014 enough to choose what to activate with `PATCH /v1/listings/{id}`.",
12832
+ "summary": "List properties (older name for /v1/listings)",
12833
+ "description": "**`/v1/properties` is the older name for `/v1/listings`** \u2014 the same listings, the same ids. It stays for existing integrations; new code should use `/v1/listings`, which is where create, content, publishing and markups live.\n\nCursor-paginated list of properties for the authenticated workspace. Walk pages with `?cursor=<pagination.nextCursor>`; stop when `pagination.hasMore` is `false`. Cursor is opaque base64 \u2014 do not parse it.\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: `q` (substring on name/street/city), `status` (active|inactive|all), `lifecycle_status` (exact match on the listing's lifecycle state). Other unknown params (e.g. `?search=` or `?propertyId=`) are rejected with 422 \u2014 no silent unfiltered results.\n\n**Incremental sync (only changes since last poll):** pass `?updated_since=<ISO8601>` to receive only properties changed at or after that instant. Each property carries `updatedAt` \u2014 the last row of the final page is your next watermark. `updated_since` changes the page ordering to `updatedAt ASC, id ASC` (and the cursor with it); see the parameter description. `GET /v1/listings` does NOT yet accept `updated_since` \u2014 use this endpoint for property-side incremental sync.\n\n**Inactive properties:** an inactive property keeps syncing, but cannot be read or changed through the API until it is activated. They are only listed when `status` asks for them, and then with `id`, `name`, `status`, `lifecycleStatus`, `channels` and `updatedAt` only \u2014 enough to choose what to activate with `PATCH /v1/listings/{id}`.",
12833
12834
  "tags": [
12834
12835
  "Properties"
12835
12836
  ],
@@ -12931,8 +12932,8 @@
12931
12932
  "/v1/properties/{id}": {
12932
12933
  "get": {
12933
12934
  "operationId": "get_property",
12934
- "description": "Fetch a single property by Repull id. Property ids are workspace-scoped \u2014 an id from one workspace is not valid in another. 404 means the id does not exist OR belongs to a different workspace.\n\n**Optional expansions:** Pass `?include=amenities` to enrich the response with the property's amenities (sourced from the unified `listings_amenities` table). Returns `[]` when the property has no amenity rows. The default response stays lean; consumers must opt in.\n\nReturns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.",
12935
- "summary": "Get property details",
12935
+ "description": "**`/v1/properties` is the older name for `/v1/listings`** \u2014 the same listings, the same ids. It stays for existing integrations; new code should use `/v1/listings`, which is where create, content, publishing and markups live.\n\nFetch a single property by Repull id. Property ids are workspace-scoped \u2014 an id from one workspace is not valid in another. 404 means the id does not exist OR belongs to a different workspace.\n\n**Optional expansions:** Pass `?include=amenities` to enrich the response with the property's amenities (sourced from the unified `listings_amenities` table). Returns `[]` when the property has no amenity rows. The default response stays lean; consumers must opt in.\n\nReturns `403 listing_inactive` when the listing is inactive. An inactive listing keeps syncing, but cannot be read or changed through the API until it is activated.",
12936
+ "summary": "Get property details (older name for /v1/listings/{id})",
12936
12937
  "tags": [
12937
12938
  "Properties"
12938
12939
  ],
@@ -18038,13 +18039,26 @@
18038
18039
  "$ref": "#/components/responses/Unauthorized"
18039
18040
  },
18040
18041
  "403": {
18041
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
18042
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
18042
18043
  "content": {
18043
18044
  "application/json": {
18044
18045
  "schema": {
18045
18046
  "$ref": "#/components/schemas/Error"
18046
18047
  },
18047
18048
  "examples": {
18049
+ "insufficientAccess": {
18050
+ "summary": "The Airbnb account is not connected with full access",
18051
+ "value": {
18052
+ "error": {
18053
+ "code": "insufficient_access",
18054
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
18055
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
18056
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
18057
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
18058
+ "accessType": "messaging"
18059
+ }
18060
+ }
18061
+ },
18048
18062
  "reauth": {
18049
18063
  "summary": "The Airbnb connection no longer allows this",
18050
18064
  "value": {
@@ -20273,13 +20287,26 @@
20273
20287
  "$ref": "#/components/responses/Unauthorized"
20274
20288
  },
20275
20289
  "403": {
20276
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
20290
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
20277
20291
  "content": {
20278
20292
  "application/json": {
20279
20293
  "schema": {
20280
20294
  "$ref": "#/components/schemas/Error"
20281
20295
  },
20282
20296
  "examples": {
20297
+ "insufficientAccess": {
20298
+ "summary": "The Airbnb account is not connected with full access",
20299
+ "value": {
20300
+ "error": {
20301
+ "code": "insufficient_access",
20302
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
20303
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
20304
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
20305
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
20306
+ "accessType": "messaging"
20307
+ }
20308
+ }
20309
+ },
20283
20310
  "reauth": {
20284
20311
  "summary": "The Airbnb connection no longer allows this",
20285
20312
  "value": {
@@ -20605,13 +20632,26 @@
20605
20632
  "$ref": "#/components/responses/Unauthorized"
20606
20633
  },
20607
20634
  "403": {
20608
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
20635
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
20609
20636
  "content": {
20610
20637
  "application/json": {
20611
20638
  "schema": {
20612
20639
  "$ref": "#/components/schemas/Error"
20613
20640
  },
20614
20641
  "examples": {
20642
+ "insufficientAccess": {
20643
+ "summary": "The Airbnb account is not connected with full access",
20644
+ "value": {
20645
+ "error": {
20646
+ "code": "insufficient_access",
20647
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
20648
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
20649
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
20650
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
20651
+ "accessType": "messaging"
20652
+ }
20653
+ }
20654
+ },
20615
20655
  "reauth": {
20616
20656
  "summary": "The Airbnb connection no longer allows this",
20617
20657
  "value": {
@@ -20878,13 +20918,26 @@
20878
20918
  "$ref": "#/components/responses/Unauthorized"
20879
20919
  },
20880
20920
  "403": {
20881
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
20921
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
20882
20922
  "content": {
20883
20923
  "application/json": {
20884
20924
  "schema": {
20885
20925
  "$ref": "#/components/schemas/Error"
20886
20926
  },
20887
20927
  "examples": {
20928
+ "insufficientAccess": {
20929
+ "summary": "The Airbnb account is not connected with full access",
20930
+ "value": {
20931
+ "error": {
20932
+ "code": "insufficient_access",
20933
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
20934
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
20935
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
20936
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
20937
+ "accessType": "messaging"
20938
+ }
20939
+ }
20940
+ },
20888
20941
  "reauth": {
20889
20942
  "summary": "The Airbnb connection no longer allows this",
20890
20943
  "value": {
@@ -26861,13 +26914,26 @@
26861
26914
  "$ref": "#/components/responses/Unauthorized"
26862
26915
  },
26863
26916
  "403": {
26864
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
26917
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
26865
26918
  "content": {
26866
26919
  "application/json": {
26867
26920
  "schema": {
26868
26921
  "$ref": "#/components/schemas/Error"
26869
26922
  },
26870
26923
  "examples": {
26924
+ "insufficientAccess": {
26925
+ "summary": "The Airbnb account is not connected with full access",
26926
+ "value": {
26927
+ "error": {
26928
+ "code": "insufficient_access",
26929
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
26930
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
26931
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
26932
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
26933
+ "accessType": "messaging"
26934
+ }
26935
+ }
26936
+ },
26871
26937
  "reauth": {
26872
26938
  "summary": "The Airbnb connection no longer allows this",
26873
26939
  "value": {
@@ -27352,13 +27418,26 @@
27352
27418
  "$ref": "#/components/responses/Unauthorized"
27353
27419
  },
27354
27420
  "403": {
27355
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
27421
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
27356
27422
  "content": {
27357
27423
  "application/json": {
27358
27424
  "schema": {
27359
27425
  "$ref": "#/components/schemas/Error"
27360
27426
  },
27361
27427
  "examples": {
27428
+ "insufficientAccess": {
27429
+ "summary": "The Airbnb account is not connected with full access",
27430
+ "value": {
27431
+ "error": {
27432
+ "code": "insufficient_access",
27433
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
27434
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
27435
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
27436
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
27437
+ "accessType": "messaging"
27438
+ }
27439
+ }
27440
+ },
27362
27441
  "reauth": {
27363
27442
  "summary": "The Airbnb connection no longer allows this",
27364
27443
  "value": {
@@ -27764,13 +27843,26 @@
27764
27843
  "$ref": "#/components/responses/Unauthorized"
27765
27844
  },
27766
27845
  "403": {
27767
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
27846
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
27768
27847
  "content": {
27769
27848
  "application/json": {
27770
27849
  "schema": {
27771
27850
  "$ref": "#/components/schemas/Error"
27772
27851
  },
27773
27852
  "examples": {
27853
+ "insufficientAccess": {
27854
+ "summary": "The Airbnb account is not connected with full access",
27855
+ "value": {
27856
+ "error": {
27857
+ "code": "insufficient_access",
27858
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
27859
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
27860
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
27861
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
27862
+ "accessType": "messaging"
27863
+ }
27864
+ }
27865
+ },
27774
27866
  "reauth": {
27775
27867
  "summary": "The Airbnb connection no longer allows this",
27776
27868
  "value": {
@@ -28003,13 +28095,26 @@
28003
28095
  "$ref": "#/components/responses/Unauthorized"
28004
28096
  },
28005
28097
  "403": {
28006
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
28098
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
28007
28099
  "content": {
28008
28100
  "application/json": {
28009
28101
  "schema": {
28010
28102
  "$ref": "#/components/schemas/Error"
28011
28103
  },
28012
28104
  "examples": {
28105
+ "insufficientAccess": {
28106
+ "summary": "The Airbnb account is not connected with full access",
28107
+ "value": {
28108
+ "error": {
28109
+ "code": "insufficient_access",
28110
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
28111
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
28112
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
28113
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
28114
+ "accessType": "messaging"
28115
+ }
28116
+ }
28117
+ },
28013
28118
  "reauth": {
28014
28119
  "summary": "The Airbnb connection no longer allows this",
28015
28120
  "value": {
@@ -28548,13 +28653,26 @@
28548
28653
  "$ref": "#/components/responses/Unauthorized"
28549
28654
  },
28550
28655
  "403": {
28551
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
28656
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
28552
28657
  "content": {
28553
28658
  "application/json": {
28554
28659
  "schema": {
28555
28660
  "$ref": "#/components/schemas/Error"
28556
28661
  },
28557
28662
  "examples": {
28663
+ "insufficientAccess": {
28664
+ "summary": "The Airbnb account is not connected with full access",
28665
+ "value": {
28666
+ "error": {
28667
+ "code": "insufficient_access",
28668
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
28669
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
28670
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
28671
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
28672
+ "accessType": "messaging"
28673
+ }
28674
+ }
28675
+ },
28558
28676
  "reauth": {
28559
28677
  "summary": "The Airbnb connection no longer allows this",
28560
28678
  "value": {
@@ -28936,13 +29054,26 @@
28936
29054
  "$ref": "#/components/responses/Unauthorized"
28937
29055
  },
28938
29056
  "403": {
28939
- "description": "`connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired, revoked, or granted without messaging/reservation permissions). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
29057
+ "description": "`insufficient_access` \u2014 the Airbnb account is connected with read-only or messaging access; this action needs full access (Airbnb's `property_management` permission). Nothing was sent to Airbnb; reconnect with `accessType: full_access`. `connection_reauth_required` \u2014 Airbnb no longer accepts the connection for this action (expired or revoked). Reconnect; retrying cannot succeed. `listing_inactive` \u2014 the listing is inactive.",
28940
29058
  "content": {
28941
29059
  "application/json": {
28942
29060
  "schema": {
28943
29061
  "$ref": "#/components/schemas/Error"
28944
29062
  },
28945
29063
  "examples": {
29064
+ "insufficientAccess": {
29065
+ "summary": "The Airbnb account is not connected with full access",
29066
+ "value": {
29067
+ "error": {
29068
+ "code": "insufficient_access",
29069
+ "message": "This Airbnb account is connected with messaging access, which cannot accept or decline booking requests. It needs full access.",
29070
+ "fix": "Reconnect this Airbnb account with full access \u2014 `POST /v1/connect/airbnb` with `\"accessType\": \"full_access\"` \u2014 then retry.",
29071
+ "docs_url": "https://repull.dev/docs/errors/insufficient_access",
29072
+ "request_id": "req_01J5X7Y8Z9ABCDEF12345678",
29073
+ "accessType": "messaging"
29074
+ }
29075
+ }
29076
+ },
28946
29077
  "reauth": {
28947
29078
  "summary": "The Airbnb connection no longer allows this",
28948
29079
  "value": {
@@ -29912,6 +30043,175 @@
29912
30043
  }
29913
30044
  }
29914
30045
  }
30046
+ },
30047
+ "/v1/listings/{id}/markups": {
30048
+ "get": {
30049
+ "operationId": "get_listing_markups",
30050
+ "summary": "Get a listing's channel markups",
30051
+ "description": "The markup each channel adds to this listing's price.\n\nA listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel.\n\n- **Airbnb** \u2014 one markup per listing.\n- **Booking.com** \u2014 one markup per **property**, shared by every listing priced through it (`listingIds` names them).\n\nReturns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one.",
30052
+ "tags": [
30053
+ "Listings"
30054
+ ],
30055
+ "parameters": [
30056
+ {
30057
+ "name": "id",
30058
+ "in": "path",
30059
+ "required": true,
30060
+ "schema": {
30061
+ "type": "string"
30062
+ },
30063
+ "description": "Repull listing id."
30064
+ }
30065
+ ],
30066
+ "responses": {
30067
+ "200": {
30068
+ "description": "Markups per channel.",
30069
+ "content": {
30070
+ "application/json": {
30071
+ "schema": {
30072
+ "type": "object",
30073
+ "properties": {
30074
+ "id": {
30075
+ "type": "string",
30076
+ "description": "Repull listing id."
30077
+ },
30078
+ "airbnb": {
30079
+ "type": "array",
30080
+ "items": {
30081
+ "type": "object",
30082
+ "properties": {
30083
+ "airbnbId": {
30084
+ "type": "string",
30085
+ "description": "Airbnb listing id."
30086
+ },
30087
+ "markupPercent": {
30088
+ "type": "number",
30089
+ "nullable": true,
30090
+ "description": "Percent added to the listing's price on Airbnb. 35 = +35%. `null` = none.",
30091
+ "example": 35
30092
+ }
30093
+ }
30094
+ }
30095
+ },
30096
+ "booking": {
30097
+ "type": "array",
30098
+ "items": {
30099
+ "type": "object",
30100
+ "properties": {
30101
+ "hotelId": {
30102
+ "type": "string",
30103
+ "description": "Booking.com property id."
30104
+ },
30105
+ "markupPercent": {
30106
+ "type": "number",
30107
+ "nullable": true,
30108
+ "description": "Percent added on Booking.com, for every listing on this property.",
30109
+ "example": 18
30110
+ },
30111
+ "listingIds": {
30112
+ "type": "array",
30113
+ "items": {
30114
+ "type": "string"
30115
+ },
30116
+ "description": "Listings in this workspace priced through this property \u2014 all share this markup."
30117
+ }
30118
+ }
30119
+ }
30120
+ }
30121
+ }
30122
+ }
30123
+ }
30124
+ }
30125
+ },
30126
+ "401": {
30127
+ "$ref": "#/components/responses/Unauthorized"
30128
+ },
30129
+ "403": {
30130
+ "$ref": "#/components/responses/ListingInactive"
30131
+ },
30132
+ "404": {
30133
+ "$ref": "#/components/responses/NotFound"
30134
+ }
30135
+ }
30136
+ },
30137
+ "put": {
30138
+ "operationId": "set_listing_markup",
30139
+ "summary": "Set a listing's markup on a channel",
30140
+ "description": "Set the markup one channel adds to this listing's price. When the value changes, the affected listings' prices are re-sent to that channel straight away (`pricesResent`); nothing else is sent.\n\nA listing's price on a channel is its own nightly price plus the channel's markup: a $200 night with a 35% Airbnb markup is sent to Airbnb as $270. The calendar keeps the listing's own price (`GET /v1/availability/{propertyId}` returns it); the markup is added only when a price is sent to the channel.\n\n- **Airbnb** \u2014 one markup per listing.\n- **Booking.com** \u2014 one markup per **property**, shared by every listing priced through it (`listingIds` names them).\n\nReturns `404 not_found` for a listing that does not exist or is not in this workspace, and `403 listing_inactive` for an inactive one.\n\nOn Booking.com the markup belongs to the property, so setting it reprices every listing on that property (`affectedListingIds`). A listing on more than one property must name one with `hotelId`; without it the request is refused with `409 ambiguous_booking_mapping` listing the candidates, rather than repricing a property it guessed.\n\n`markupPercent` is a percentage \u2014 `15` for 15%. A value between 0 and 1 is refused as a probable fraction, with the number to send instead.",
30141
+ "tags": [
30142
+ "Listings"
30143
+ ],
30144
+ "parameters": [
30145
+ {
30146
+ "name": "id",
30147
+ "in": "path",
30148
+ "required": true,
30149
+ "schema": {
30150
+ "type": "string"
30151
+ },
30152
+ "description": "Repull listing id."
30153
+ }
30154
+ ],
30155
+ "requestBody": {
30156
+ "required": true,
30157
+ "content": {
30158
+ "application/json": {
30159
+ "schema": {
30160
+ "type": "object",
30161
+ "required": [
30162
+ "channel",
30163
+ "markupPercent"
30164
+ ],
30165
+ "properties": {
30166
+ "channel": {
30167
+ "type": "string",
30168
+ "enum": [
30169
+ "airbnb",
30170
+ "booking"
30171
+ ]
30172
+ },
30173
+ "markupPercent": {
30174
+ "type": "number",
30175
+ "nullable": true,
30176
+ "minimum": 0,
30177
+ "maximum": 100,
30178
+ "exclusiveMaximum": true,
30179
+ "description": "15 = +15%. `null` removes the markup."
30180
+ },
30181
+ "hotelId": {
30182
+ "type": "string",
30183
+ "description": "Booking.com property \u2014 required when the listing is on more than one."
30184
+ }
30185
+ }
30186
+ },
30187
+ "example": {
30188
+ "channel": "booking",
30189
+ "markupPercent": 18
30190
+ }
30191
+ }
30192
+ }
30193
+ },
30194
+ "responses": {
30195
+ "200": {
30196
+ "description": "Saved. `{ id, channel, markupPercent, changed, hotelId?, affectedListingIds, pricesResent }`."
30197
+ },
30198
+ "401": {
30199
+ "$ref": "#/components/responses/Unauthorized"
30200
+ },
30201
+ "403": {
30202
+ "$ref": "#/components/responses/ListingInactive"
30203
+ },
30204
+ "404": {
30205
+ "$ref": "#/components/responses/NotFound"
30206
+ },
30207
+ "409": {
30208
+ "description": "`ambiguous_booking_mapping` \u2014 the listing is on several Booking.com properties; `valid_values` lists them."
30209
+ },
30210
+ "422": {
30211
+ "$ref": "#/components/responses/UnprocessableEntity"
30212
+ }
30213
+ }
30214
+ }
29915
30215
  }
29916
30216
  }
29917
30217
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repull
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nikolov
@@ -285,6 +285,9 @@ files:
285
285
  - lib/repull/models/get_airbnb_offer200_response.rb
286
286
  - lib/repull/models/get_airbnb_thread200_response.rb
287
287
  - lib/repull/models/get_health200_response.rb
288
+ - lib/repull/models/get_listing_markups200_response.rb
289
+ - lib/repull/models/get_listing_markups200_response_airbnb_inner.rb
290
+ - lib/repull/models/get_listing_markups200_response_booking_inner.rb
288
291
  - lib/repull/models/get_migration200_response.rb
289
292
  - lib/repull/models/get_migration_channel_map200_response.rb
290
293
  - lib/repull/models/get_migration_report200_response.rb
@@ -553,6 +556,7 @@ files:
553
556
  - lib/repull/models/set_airbnb_listing_cover_photo200_response_data.rb
554
557
  - lib/repull/models/set_airbnb_listing_cover_photo_request.rb
555
558
  - lib/repull/models/set_kv_request.rb
559
+ - lib/repull/models/set_listing_markup_request.rb
556
560
  - lib/repull/models/submit_beds24_credentials200_response.rb
557
561
  - lib/repull/models/submit_beds24_credentials_request.rb
558
562
  - lib/repull/models/submit_bookingsync_credentials_request.rb