> For the complete documentation index, see [llms.txt](https://docs.channex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channex.io/api-v.1-documentation/airbnb-api.md).

# Airbnb API

API Methods to works with Airbnb connection

This section contain infromation about API related to Airbnb functionality such us:

* Manage listing settings
* Manage Promotions, Opportunities and Checkout Tasks
* Work with Inquiry, Reservation and Alteration requests

All information about creating connection between Channex and Airbnb you can find at page [Channel API Examples / Airbnb](/channel-api-examples/airbnb.md).

## Manage Listing settings

### Listing Publishing

A listing is published (open for booking) or unpublished on Airbnb through the connection:

## Publish a listing

> Publish an Airbnb listing: the listing's availability is switched on at\
> Airbnb, and the published state is recorded on the listing's mapping.\
> Publishing a listing that is already published succeeds without changes.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbPublishStatus":{"type":"object","required":["published"],"properties":{"published":{"type":"boolean","description":"Whether the listing is published."}},"description":"Publication state of an Airbnb listing."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Channels.AirbnbListingActionRequest":{"type":"object","required":["listing_id"],"properties":{"listing_id":{"type":"string","description":"Airbnb listing ID."}},"description":"The listing an action applies to."}}},"paths":{"/channels/{channel_id}/execute/publish":{"put":{"operationId":"Channels_airbnbPublish","summary":"Publish a listing","description":"Publish an Airbnb listing: the listing's availability is switched on at\nAirbnb, and the published state is recorded on the listing's mapping.\nPublishing a listing that is already published succeeds without changes.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbPublishStatus"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.AirbnbListingActionRequest"}}}}}}}}
```

## Unpublish a listing

> Unpublish an Airbnb listing: the listing's availability is switched off\
> at Airbnb with the given deactivation reason, and the published state is\
> recorded on the listing's mapping. Unpublishing a listing that is already\
> unpublished succeeds without changes.\
> \
> The valid reasons come from the unpublish-reasons questionnaire — see\
> \`GET /channels/{channel\_id}/action/get\_unpublish\_reasons\`.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbPublishStatus":{"type":"object","required":["published"],"properties":{"published":{"type":"boolean","description":"Whether the listing is published."}},"description":"Publication state of an Airbnb listing."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Channels.AirbnbUnpublishRequest":{"type":"object","required":["listing_id"],"properties":{"listing_id":{"type":"string","description":"Airbnb listing ID."},"deactivation_reason":{"type":"string","description":"Reason the listing is unlisted, as Airbnb expects it — a `value` from the\nunpublish-reasons questionnaire (see\n`GET /channels/{channel_id}/action/get_unpublish_reasons`). Defaults to\n`OtherReason`."},"deactivation_details":{"type":"string","description":"Free-text details accompanying the reason."}},"description":"Unpublish parameters of an Airbnb listing."}}},"paths":{"/channels/{channel_id}/execute/unpublish":{"put":{"operationId":"Channels_airbnbUnpublish","summary":"Unpublish a listing","description":"Unpublish an Airbnb listing: the listing's availability is switched off\nat Airbnb with the given deactivation reason, and the published state is\nrecorded on the listing's mapping. Unpublishing a listing that is already\nunpublished succeeds without changes.\n\nThe valid reasons come from the unpublish-reasons questionnaire — see\n`GET /channels/{channel_id}/action/get_unpublish_reasons`.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbPublishStatus"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.AirbnbUnpublishRequest"}}}}}}}}
```

Unpublishing takes a deactivation reason. The valid reasons — with the question texts to show a host — come from Airbnb's questionnaire:

## Retrieve the unpublish reasons

> Retrieve Airbnb's unpublish-reasons questionnaire: the questions a host\
> answers when unlisting, with their nested answer choices. The choice\
> values are submitted as the \`deactivation\_reason\` of an unpublish\
> request. The questionnaire is requested from Airbnb.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbUnpublishReasons":{"type":"object","required":["flows"],"properties":{"flows":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbDeactivationFlow"}}},"description":"The unpublish-reasons questionnaire of Airbnb."},"Channels.AirbnbDeactivationFlow":{"type":"object","required":["slug","description","questions"],"properties":{"slug":{"type":"string"},"description":{"type":"string"},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbDeactivationQuestion"}}},"description":"A deactivation flow: the questions to answer when unlisting."},"Channels.AirbnbDeactivationQuestion":{"type":"object","required":["key","answer_key","type","is_required","answer_editable","description","choices"],"properties":{"key":{"type":"string","description":"Question key."},"answer_key":{"type":"string","description":"The unpublish request field the answer is submitted as."},"type":{"type":"string","description":"Control type of the question."},"is_required":{"type":"boolean","description":"Whether an answer is required."},"answer_editable":{"type":"boolean","description":"Whether the answer accepts free-text editing."},"description":{"type":"string","description":"Question text."},"choices":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbDeactivationChoice"},"description":"The answer choices."}},"description":"A question of a deactivation flow."},"Channels.AirbnbDeactivationChoice":{"type":"object","required":["value","description","choices"],"properties":{"value":{"type":"string","description":"Choice value — submitted as the answer."},"description":{"type":"string","description":"Human-readable choice text."},"choices":{"description":"More specific choices within this one. Empty when there are none.","type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbDeactivationChoice"}}},"description":"An answer choice of a deactivation question. Choices can nest: a top-level choice groups more specific ones."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/action/get_unpublish_reasons":{"get":{"operationId":"Channels_airbnbUnpublishReasons","summary":"Retrieve the unpublish reasons","description":"Retrieve Airbnb's unpublish-reasons questionnaire: the questions a host\nanswers when unlisting, with their nested answer choices. The choice\nvalues are submitted as the `deactivation_reason` of an unpublish\nrequest. The questionnaire is requested from Airbnb.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"locale","in":"query","required":false,"description":"Locale of the questionnaire texts. Defaults to `en`.","schema":{"type":"string"},"explode":false}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbUnpublishReasons"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"]}}}}
```

### Availability Settings

Manage lead time, notice, min/max stay, check-in/check-out days, turnover.

## Retrieve the availability settings of a listing

> Retrieve the Airbnb availability settings of a mapped listing: booking\
> lead time, how far ahead the listing can be booked, night-count limits\
> and check-in/check-out weekday rules.\
> \
> Listings on Airbnb's standard pricing model report the check-in and\
> check-out weekday flags; listings on the length-of-stay pricing model\
> report \`default\_min\_nights\`. The settings are read as stored on the\
> mapping — nothing is requested from Airbnb. For Airbnb channel\
> connections.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Mappings.AirbnbAvailabilitySettingsResource":{"type":"object","required":["type","id","attributes"],"properties":{"type":{"type":"string","enum":["airbnb_listing_availability_settings"]},"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Mapping ID."},"attributes":{"$ref":"#/components/schemas/Mappings.AvailabilitySettings"}},"description":"The availability settings of a mapped Airbnb listing."},"Mappings.AvailabilitySettings":{"type":"object","required":["booking_lead_time","max_days_notice","allow_rtb_beyond_max_days_notice","default_max_nights","allow_rtb_above_max_nights","turnover_days"],"properties":{"booking_lead_time":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,48,72,168],"description":"Minimum notice required before guests can book, in hours. Valid values are 0–24, 48, 72 and 168."},"max_days_notice":{"type":"number","enum":[-1,0,30,60,90,120,150,180,210,240,270,300,330,365],"description":"Maximum number of days between the booking date and the check-in date.\nValid values are -1, 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300,\n330 and 365: `0` makes all future days unavailable, `-1` resets all\nfuture days to available."},"allow_rtb_beyond_max_days_notice":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether guests can create a Request to Book for reservations starting beyond the `max_days_notice` window. `null` when not set."},"default_min_nights":{"type":"integer","format":"int32","minimum":0,"maximum":1125,"description":"Default minimum-nights requirement, between 1 and 1125. Reported for listings on the length-of-stay pricing model."},"default_max_nights":{"type":"integer","format":"int32","minimum":0,"maximum":1125,"description":"Default maximum-nights requirement, between 1 and 1125. `0` means the Airbnb default."},"allow_rtb_above_max_nights":{"type":"boolean","description":"Whether guests can create a Request to Book for stays above `default_max_nights`. Applies when `default_max_nights` is 28 or greater; a seasonal or daily max-nights setting overrides it."},"day_of_week_check_in":{"type":"array","items":{"type":"boolean"},"minItems":7,"maxItems":7,"description":"Weekdays guests are allowed to check in on: seven booleans starting with\nMonday — `[false, false, false, false, true, true, false]` allows\ncheck-in on Fridays and Saturdays. Reported for listings on the standard\npricing model."},"day_of_week_check_out":{"type":"array","items":{"type":"boolean"},"minItems":7,"maxItems":7,"description":"Weekdays guests are allowed to check out on: seven booleans starting with Monday. Reported for listings on the standard pricing model."},"day_of_week_min_nights":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.weekdayMinNights"},"minItems":7,"maxItems":7,"description":"Minimum number of nights when the reservation starts on each weekday: seven values starting with Monday."},"seasonal_min_nights":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.SeasonalMinNights"},"description":"Minimum-nights rules for specific date ranges."},"turnover_days":{"type":"number","enum":[0,1,2],"description":"Number of days the host requires for preparation between reservations."}},"description":"Availability settings of an Airbnb listing, as reported for a mapping."},"Mappings.weekdayMinNights":{"type":"integer","format":"int32","minimum":-1,"maximum":1125,"description":"Weekday minimum-nights value. `-1` resets the weekday to the default."},"Mappings.SeasonalMinNights":{"type":"object","required":["start_date","end_date","min_nights"],"properties":{"start_date":{"type":"string","format":"date","description":"Start date of the rule's date range."},"end_date":{"type":"string","format":"date","description":"End date of the rule's date range."},"min_nights":{"type":"integer","format":"int32","minimum":1,"maximum":1125,"description":"Minimum number of nights when the trip starts on a day within the range, between 1 and 1125."}},"description":"A seasonal minimum-nights rule: the minimum stay for trips starting within a date range."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/mappings/{id}/availability_settings":{"get":{"operationId":"Mappings_readAvailabilitySettings","summary":"Retrieve the availability settings of a listing","description":"Retrieve the Airbnb availability settings of a mapped listing: booking\nlead time, how far ahead the listing can be booked, night-count limits\nand check-in/check-out weekday rules.\n\nListings on Airbnb's standard pricing model report the check-in and\ncheck-out weekday flags; listings on the length-of-stay pricing model\nreport `default_min_nights`. The settings are read as stored on the\nmapping — nothing is requested from Airbnb. For Airbnb channel\nconnections.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"id","in":"path","required":true,"description":"Mapping ID — see `rate_plans[].id` of the channel connection.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Mappings.AirbnbAvailabilitySettingsResource"}},"description":"JSON:API document wrapping a single resource."}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ValidationError"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"]}}}}
```

## Update the availability settings of a listing

> Update the Airbnb availability settings of a mapped listing. The changes\
> are pushed to Airbnb and stored on the mapping; a change of\
> \`max\_days\_notice\` additionally triggers a full synchronisation of the\
> connection. Returns the updated availability settings.\
> \
> Supported for Airbnb channel connections; other channels receive\
> \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Mappings.AirbnbAvailabilitySettingsResource":{"type":"object","required":["type","id","attributes"],"properties":{"type":{"type":"string","enum":["airbnb_listing_availability_settings"]},"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Mapping ID."},"attributes":{"$ref":"#/components/schemas/Mappings.AvailabilitySettings"}},"description":"The availability settings of a mapped Airbnb listing."},"Mappings.AvailabilitySettings":{"type":"object","required":["booking_lead_time","max_days_notice","allow_rtb_beyond_max_days_notice","default_max_nights","allow_rtb_above_max_nights","turnover_days"],"properties":{"booking_lead_time":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,48,72,168],"description":"Minimum notice required before guests can book, in hours. Valid values are 0–24, 48, 72 and 168."},"max_days_notice":{"type":"number","enum":[-1,0,30,60,90,120,150,180,210,240,270,300,330,365],"description":"Maximum number of days between the booking date and the check-in date.\nValid values are -1, 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300,\n330 and 365: `0` makes all future days unavailable, `-1` resets all\nfuture days to available."},"allow_rtb_beyond_max_days_notice":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Whether guests can create a Request to Book for reservations starting beyond the `max_days_notice` window. `null` when not set."},"default_min_nights":{"type":"integer","format":"int32","minimum":0,"maximum":1125,"description":"Default minimum-nights requirement, between 1 and 1125. Reported for listings on the length-of-stay pricing model."},"default_max_nights":{"type":"integer","format":"int32","minimum":0,"maximum":1125,"description":"Default maximum-nights requirement, between 1 and 1125. `0` means the Airbnb default."},"allow_rtb_above_max_nights":{"type":"boolean","description":"Whether guests can create a Request to Book for stays above `default_max_nights`. Applies when `default_max_nights` is 28 or greater; a seasonal or daily max-nights setting overrides it."},"day_of_week_check_in":{"type":"array","items":{"type":"boolean"},"minItems":7,"maxItems":7,"description":"Weekdays guests are allowed to check in on: seven booleans starting with\nMonday — `[false, false, false, false, true, true, false]` allows\ncheck-in on Fridays and Saturdays. Reported for listings on the standard\npricing model."},"day_of_week_check_out":{"type":"array","items":{"type":"boolean"},"minItems":7,"maxItems":7,"description":"Weekdays guests are allowed to check out on: seven booleans starting with Monday. Reported for listings on the standard pricing model."},"day_of_week_min_nights":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.weekdayMinNights"},"minItems":7,"maxItems":7,"description":"Minimum number of nights when the reservation starts on each weekday: seven values starting with Monday."},"seasonal_min_nights":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.SeasonalMinNights"},"description":"Minimum-nights rules for specific date ranges."},"turnover_days":{"type":"number","enum":[0,1,2],"description":"Number of days the host requires for preparation between reservations."}},"description":"Availability settings of an Airbnb listing, as reported for a mapping."},"Mappings.weekdayMinNights":{"type":"integer","format":"int32","minimum":-1,"maximum":1125,"description":"Weekday minimum-nights value. `-1` resets the weekday to the default."},"Mappings.SeasonalMinNights":{"type":"object","required":["start_date","end_date","min_nights"],"properties":{"start_date":{"type":"string","format":"date","description":"Start date of the rule's date range."},"end_date":{"type":"string","format":"date","description":"End date of the rule's date range."},"min_nights":{"type":"integer","format":"int32","minimum":1,"maximum":1125,"description":"Minimum number of nights when the trip starts on a day within the range, between 1 and 1125."}},"description":"A seasonal minimum-nights rule: the minimum stay for trips starting within a date range."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Mappings.AvailabilitySettingsUpdateRequest":{"type":"object","required":["availability_settings"],"properties":{"availability_settings":{"$ref":"#/components/schemas/Mappings.AvailabilitySettingsInput"}},"description":"Request body of the availability settings update."},"Mappings.AvailabilitySettingsInput":{"type":"object","required":["booking_lead_time","max_days_notice","default_max_nights","turnover_days"],"properties":{"booking_lead_time":{"type":"number","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,48,72,168],"description":"Minimum notice required before guests can book, in hours. Valid values are 0–24, 48, 72 and 168."},"max_days_notice":{"type":"number","enum":[-1,0,30,60,90,120,150,180,210,240,270,300,330,365],"description":"Maximum number of days between the booking date and the check-in date.\nValid values are -1, 0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300,\n330 and 365: pass `0` to make all future days unavailable, `-1` to reset\nall future days to available."},"allow_rtb_beyond_max_days_notice":{"type":"boolean","description":"Whether guests can create a Request to Book for reservations starting beyond the `max_days_notice` window. Defaults to `false`."},"default_min_nights":{"type":"integer","format":"int32","minimum":0,"maximum":1125,"description":"Default minimum-nights requirement, between 1 and 1125; `0` resets it to the default. Required for listings on the length-of-stay pricing model."},"default_max_nights":{"type":"integer","format":"int32","minimum":0,"maximum":1125,"description":"Default maximum-nights requirement, between 1 and 1125; `0` resets it to the default."},"allow_rtb_above_max_nights":{"type":"boolean","description":"Whether guests can create a Request to Book for stays above `default_max_nights`. Applies when `default_max_nights` is 28 or greater; a seasonal or daily max-nights setting overrides it. Defaults to `false`."},"day_of_week_check_in":{"type":"array","items":{"type":"boolean"},"minItems":7,"maxItems":7,"description":"Weekdays guests are allowed to check in on: seven booleans starting with\nMonday — `[false, false, false, false, true, true, false]` allows\ncheck-in on Fridays and Saturdays. Required for listings on the standard\npricing model."},"day_of_week_check_out":{"type":"array","items":{"type":"boolean"},"minItems":7,"maxItems":7,"description":"Weekdays guests are allowed to check out on: seven booleans starting with Monday. Required for listings on the standard pricing model."},"seasonal_min_nights":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.SeasonalMinNights"},"description":"Minimum-nights rules for specific date ranges."},"turnover_days":{"type":"number","enum":[0,1,2],"description":"Number of days the host requires for preparation between reservations."}},"description":"Availability settings to apply to a mapped listing."}}},"paths":{"/channels/{channel_id}/mappings/{id}/availability_settings":{"put":{"operationId":"Mappings_updateAvailabilitySettings","summary":"Update the availability settings of a listing","description":"Update the Airbnb availability settings of a mapped listing. The changes\nare pushed to Airbnb and stored on the mapping; a change of\n`max_days_notice` additionally triggers a full synchronisation of the\nconnection. Returns the updated availability settings.\n\nSupported for Airbnb channel connections; other channels receive\n`400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"id","in":"path","required":true,"description":"Mapping ID — see `rate_plans[].id` of the channel connection.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Mappings.AirbnbAvailabilitySettingsResource"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request has missing or invalid arguments; `details` lists the reasons.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mappings.AvailabilitySettingsUpdateRequest"}}}}}}}}
```

### Pricing Settings

Manage currency, default and weekend prices, guest counts, fees, taxes.

## Retrieve the pricing settings of a listing

> Retrieve the Airbnb pricing settings of a mapped listing: currency,\
> nightly prices, included guests, pass-through occupancy taxes, standard\
> fees and default pricing rules. The response also reports the default\
> and the allowed pass-through-tax collection types of the listing.\
> \
> The settings are read as stored on the mapping — nothing is requested\
> from Airbnb. For Airbnb channel connections.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Mappings.AirbnbPricingSettingsResource":{"type":"object","required":["type","id","attributes"],"properties":{"type":{"type":"string","enum":["airbnb_listing_pricing_settings"]},"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Mapping ID."},"attributes":{"$ref":"#/components/schemas/Mappings.PricingSettings"}},"description":"The pricing settings of a mapped Airbnb listing."},"Mappings.PricingSettings":{"type":"object","required":["currency","default_daily_price","weekend_price","guests_included","price_per_extra_person","pass_through_taxes_collection_type","pass_through_taxes","standard_fees","default_pricing_rules","default_pass_through_taxes_collection_type","allowed_pass_through_taxes_collection_types"],"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.currency"}],"description":"Listing currency in ISO 4217 format."},"default_daily_price":{"type":"integer","format":"int32","description":"Default nightly price of the listing, between 10 and 100,000 USD."},"weekend_price":{"anyOf":[{"type":"integer","format":"int32"},{"type":"null"}],"description":"Nightly price applied on weekend days, between 10 and 100,000 USD. `null` when no weekend price is set."},"guests_included":{"type":"integer","format":"int32","minimum":1,"description":"Number of guests permitted without additional fees. Infants (children under two years old) do not count towards the number of guests."},"price_per_extra_person":{"type":"integer","format":"int32","description":"Price per guest per night for each guest beyond `guests_included`, between 5 and 300 USD; `0` means no extra-person charge."},"pass_through_taxes_collection_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.PassThroughTaxCollectionType"}],"description":"The pass-through-tax collection type applied to the listing."},"pass_through_taxes":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.PassThroughTax"},"description":"Pass-through occupancy taxes applied to the listing."},"standard_fees":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.StandardFee"},"description":"Standard fees applied to the listing."},"default_pricing_rules":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.DefaultPricingRule"},"description":"Default pricing rules applied to the listing."},"default_pass_through_taxes_collection_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.PassThroughTaxCollectionType"}],"description":"The default pass-through-tax collection type of the listing."},"allowed_pass_through_taxes_collection_types":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.PassThroughTaxCollectionType"},"description":"The pass-through-tax collection types the listing is allowed to use."}},"description":"Pricing settings of an Airbnb listing, as reported for a mapping."},"Common.Scalars.currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 alphabetic currency code. See the `/currencies` endpoint for supported values."},"Mappings.PassThroughTaxCollectionType":{"type":"string","enum":["NO_AIRBNB_COLLECTED_TAX","OVERRIDE_AIRBNB_COLLECTED_TAX","STACKED_AIRBNB_COLLECTED_TAX","INELIGIBLE","UNDEFINED"],"description":"How Airbnb-collected pass-through occupancy taxes are applied to the listing."},"Mappings.PassThroughTax":{"type":"object","required":["tax_type","amount","amount_type","attestation"],"properties":{"tax_type":{"$ref":"#/components/schemas/Mappings.PassThroughTaxType"},"amount":{"type":"number","format":"double","minimum":0,"description":"The tax amount: a value between 0 and 100 for the percent amount type, a flat amount otherwise."},"amount_type":{"$ref":"#/components/schemas/Mappings.PassThroughTaxAmountType"},"taxable_base":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.PassThroughTaxableBase"},"description":"Charges the tax is based on. Applicable, and mandatory, when\n`amount_type` is `percent_per_reservation`. Not available for Luxe\nlistings."},"business_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tax ID that identifies the business as a taxpayer — the EIN in the US, for example."},"no_business_tax_id_declaration":{"type":"boolean","description":"Must be `true` when `business_tax_id` is `null`. Not available for Luxe listings."},"tot_registration_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registration ID the host receives from a jurisdiction on registering to\ncollect, remit and report the occupancy tax. The update fails with a\nvalidation error when the listing is ineligible."},"no_tot_registration_id_declaration":{"type":"boolean","description":"Must be `true` when `tot_registration_id` is `null`. Not available for Luxe listings."},"attestation":{"type":"boolean","description":"Confirmation that the tax information is true and the host accepts responsibility to remit the tax as a business."},"long_term_stay_exemption":{"type":"integer","format":"int32","description":"A length of stay in days, minimum 13: the tax does not apply to stays\nlonger than this. `null` or omitted means no exemption. Cannot be set\ntogether with `only_first_nights_exemption`. `0` is converted to `null`."},"only_first_nights_exemption":{"type":"integer","format":"int32","description":"Conditional long-term exemption: only this many first nights are taxable.\nMust be greater than 0; `null` or omitted means no exemption. Cannot be\nset together with `long_term_stay_exemption`. Not available for Luxe\nlistings."},"max_cap_per_person_per_night":{"type":"integer","format":"int32","description":"Maximum tax amount per person per night. Applicable when `amount_type` is `percent_per_reservation`. Not available for Luxe listings."}},"description":"A pass-through occupancy tax applied to the listing."},"Mappings.PassThroughTaxType":{"type":"string","enum":["pass_through_hotel_tax","pass_through_lodging_tax","pass_through_room_tax","pass_through_tourist_tax","pass_through_transient_occupancy_tax","pass_through_sales_tax","pass_through_vat_gst","pass_through_tourism_assessment_fee"],"description":"Type of a pass-through occupancy tax."},"Mappings.PassThroughTaxAmountType":{"type":"string","enum":["percent_per_reservation","flat_per_guest","flat_per_guest_per_night","flat_per_night"],"description":"How the tax amount is applied."},"Mappings.PassThroughTaxableBase":{"type":"string","enum":["base_price","pass_through_resort_fee","pass_through_community_fee","pass_through_management_fee","pass_through_linen_fee","pass_through_cleaning_fee","pass_through_pet_fee"],"description":"Charges the tax can be based on."},"Mappings.StandardFee":{"type":"object","required":["fee_type","amount_type","amount"],"properties":{"fee_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeType"}]},"offline":{"type":"boolean","description":"Whether the fee is charged offline. Defaults to `false` — the fee is charged at the time of booking."},"amount_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeAmountType"}]},"amount":{"type":"integer","format":"int32","minimum":0,"description":"For `amount_type: percent`, a value between 0 and 100 represented as an\ninteger. For `amount_type: flat`, an amount in major units of the listing\ncurrency."},"fee_unit_type":{"anyOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeUnitType"},{"type":"null"}],"description":"The unit the fee is measured in. Only applicable to fees charged each\ntime a measured unit is consumed (electricity, water, heat, air\nconditioning, or other utilities); the `amount_type` must be `flat`."},"charge_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeChargeType"}],"description":"Whether the fee applies per group, per person, or per pet. Defaults to `PER_GROUP`. `PER_PET` is available exclusively for `PASS_THROUGH_PET_FEE`."},"charge_period":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeChargePeriod"}],"description":"The period the fee is charged for. Defaults to `PER_BOOKING`."}},"description":"A standard fee applied to the listing."},"Mappings.StandardFeeType":{"type":"string","enum":["PASS_THROUGH_RESORT_FEE","PASS_THROUGH_COMMUNITY_FEE","PASS_THROUGH_MANAGEMENT_FEE","PASS_THROUGH_LINEN_FEE","PASS_THROUGH_ELECTRICITY_FEE","PASS_THROUGH_WATER_FEE","PASS_THROUGH_HEATING_FEE","PASS_THROUGH_AIR_CONDITIONING_FEE","PASS_THROUGH_UTILITY_FEE","PASS_THROUGH_PET_FEE","PASS_THROUGH_CLEANING_FEE","PASS_THROUGH_SHORT_TERM_CLEANING_FEE","PASS_THROUGH_SECURITY_DEPOSIT"],"description":"Type of a standard fee. Some fees are a flat amount, some a percentage, and some are consumption fees charged each time a unit is consumed."},"Mappings.StandardFeeAmountType":{"type":"string","enum":["percent","flat"]},"Mappings.StandardFeeUnitType":{"type":"string","enum":["PER_KILOWATT_HOUR","PER_LITER","PER_CUBIC_METER"],"description":"Unit a consumption fee is measured in."},"Mappings.StandardFeeChargeType":{"type":"string","enum":["PER_GROUP","PER_PERSON","PER_PET"]},"Mappings.StandardFeeChargePeriod":{"type":"string","enum":["PER_BOOKING","PER_NIGHT"]},"Mappings.DefaultPricingRule":{"type":"object","required":["rule_type","price_change","threshold_one"],"properties":{"rule_type":{"$ref":"#/components/schemas/Mappings.DefaultPricingRuleType"},"price_change":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Price decrease in percent."},"threshold_one":{"type":"integer","format":"int32","minimum":0,"description":"The X value of the rule, in days. Must be a multiple of 28 or 30 for\n`BOOKED_BEYOND_AT_LEAST_X_DAYS`, and at most 28 for\n`BOOKED_WITHIN_AT_MOST_X_DAYS`."}},"description":"A default pricing rule applied to the listing."},"Mappings.DefaultPricingRuleType":{"type":"string","enum":["STAYED_AT_LEAST_X_DAYS","BOOKED_WITHIN_AT_MOST_X_DAYS","BOOKED_BEYOND_AT_LEAST_X_DAYS"],"description":"Type of a default pricing rule: `STAYED_AT_LEAST_X_DAYS` — long-term stay\ndiscount; `BOOKED_WITHIN_AT_MOST_X_DAYS` — last-minute discount;\n`BOOKED_BEYOND_AT_LEAST_X_DAYS` — booking-ahead discount."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/mappings/{id}/pricing_settings":{"get":{"operationId":"Mappings_readPricingSettings","summary":"Retrieve the pricing settings of a listing","description":"Retrieve the Airbnb pricing settings of a mapped listing: currency,\nnightly prices, included guests, pass-through occupancy taxes, standard\nfees and default pricing rules. The response also reports the default\nand the allowed pass-through-tax collection types of the listing.\n\nThe settings are read as stored on the mapping — nothing is requested\nfrom Airbnb. For Airbnb channel connections.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"id","in":"path","required":true,"description":"Mapping ID — see `rate_plans[].id` of the channel connection.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Mappings.AirbnbPricingSettingsResource"}},"description":"JSON:API document wrapping a single resource."}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request body failed validation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ValidationError"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"]}}}}
```

## Update the pricing settings of a listing

> Update the Airbnb pricing settings of a mapped listing. The changes are\
> pushed to Airbnb, stored on the mapping, and followed by a full\
> synchronisation of the connection; settings identical to the stored ones\
> are not re-sent. Returns the updated pricing settings.\
> \
> Supported for Airbnb channel connections; other channels receive\
> \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Mappings.AirbnbPricingSettingsResource":{"type":"object","required":["type","id","attributes"],"properties":{"type":{"type":"string","enum":["airbnb_listing_pricing_settings"]},"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Mapping ID."},"attributes":{"$ref":"#/components/schemas/Mappings.PricingSettings"}},"description":"The pricing settings of a mapped Airbnb listing."},"Mappings.PricingSettings":{"type":"object","required":["currency","default_daily_price","weekend_price","guests_included","price_per_extra_person","pass_through_taxes_collection_type","pass_through_taxes","standard_fees","default_pricing_rules","default_pass_through_taxes_collection_type","allowed_pass_through_taxes_collection_types"],"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.currency"}],"description":"Listing currency in ISO 4217 format."},"default_daily_price":{"type":"integer","format":"int32","description":"Default nightly price of the listing, between 10 and 100,000 USD."},"weekend_price":{"anyOf":[{"type":"integer","format":"int32"},{"type":"null"}],"description":"Nightly price applied on weekend days, between 10 and 100,000 USD. `null` when no weekend price is set."},"guests_included":{"type":"integer","format":"int32","minimum":1,"description":"Number of guests permitted without additional fees. Infants (children under two years old) do not count towards the number of guests."},"price_per_extra_person":{"type":"integer","format":"int32","description":"Price per guest per night for each guest beyond `guests_included`, between 5 and 300 USD; `0` means no extra-person charge."},"pass_through_taxes_collection_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.PassThroughTaxCollectionType"}],"description":"The pass-through-tax collection type applied to the listing."},"pass_through_taxes":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.PassThroughTax"},"description":"Pass-through occupancy taxes applied to the listing."},"standard_fees":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.StandardFee"},"description":"Standard fees applied to the listing."},"default_pricing_rules":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.DefaultPricingRule"},"description":"Default pricing rules applied to the listing."},"default_pass_through_taxes_collection_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.PassThroughTaxCollectionType"}],"description":"The default pass-through-tax collection type of the listing."},"allowed_pass_through_taxes_collection_types":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.PassThroughTaxCollectionType"},"description":"The pass-through-tax collection types the listing is allowed to use."}},"description":"Pricing settings of an Airbnb listing, as reported for a mapping."},"Common.Scalars.currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 alphabetic currency code. See the `/currencies` endpoint for supported values."},"Mappings.PassThroughTaxCollectionType":{"type":"string","enum":["NO_AIRBNB_COLLECTED_TAX","OVERRIDE_AIRBNB_COLLECTED_TAX","STACKED_AIRBNB_COLLECTED_TAX","INELIGIBLE","UNDEFINED"],"description":"How Airbnb-collected pass-through occupancy taxes are applied to the listing."},"Mappings.PassThroughTax":{"type":"object","required":["tax_type","amount","amount_type","attestation"],"properties":{"tax_type":{"$ref":"#/components/schemas/Mappings.PassThroughTaxType"},"amount":{"type":"number","format":"double","minimum":0,"description":"The tax amount: a value between 0 and 100 for the percent amount type, a flat amount otherwise."},"amount_type":{"$ref":"#/components/schemas/Mappings.PassThroughTaxAmountType"},"taxable_base":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.PassThroughTaxableBase"},"description":"Charges the tax is based on. Applicable, and mandatory, when\n`amount_type` is `percent_per_reservation`. Not available for Luxe\nlistings."},"business_tax_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Tax ID that identifies the business as a taxpayer — the EIN in the US, for example."},"no_business_tax_id_declaration":{"type":"boolean","description":"Must be `true` when `business_tax_id` is `null`. Not available for Luxe listings."},"tot_registration_id":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Registration ID the host receives from a jurisdiction on registering to\ncollect, remit and report the occupancy tax. The update fails with a\nvalidation error when the listing is ineligible."},"no_tot_registration_id_declaration":{"type":"boolean","description":"Must be `true` when `tot_registration_id` is `null`. Not available for Luxe listings."},"attestation":{"type":"boolean","description":"Confirmation that the tax information is true and the host accepts responsibility to remit the tax as a business."},"long_term_stay_exemption":{"type":"integer","format":"int32","description":"A length of stay in days, minimum 13: the tax does not apply to stays\nlonger than this. `null` or omitted means no exemption. Cannot be set\ntogether with `only_first_nights_exemption`. `0` is converted to `null`."},"only_first_nights_exemption":{"type":"integer","format":"int32","description":"Conditional long-term exemption: only this many first nights are taxable.\nMust be greater than 0; `null` or omitted means no exemption. Cannot be\nset together with `long_term_stay_exemption`. Not available for Luxe\nlistings."},"max_cap_per_person_per_night":{"type":"integer","format":"int32","description":"Maximum tax amount per person per night. Applicable when `amount_type` is `percent_per_reservation`. Not available for Luxe listings."}},"description":"A pass-through occupancy tax applied to the listing."},"Mappings.PassThroughTaxType":{"type":"string","enum":["pass_through_hotel_tax","pass_through_lodging_tax","pass_through_room_tax","pass_through_tourist_tax","pass_through_transient_occupancy_tax","pass_through_sales_tax","pass_through_vat_gst","pass_through_tourism_assessment_fee"],"description":"Type of a pass-through occupancy tax."},"Mappings.PassThroughTaxAmountType":{"type":"string","enum":["percent_per_reservation","flat_per_guest","flat_per_guest_per_night","flat_per_night"],"description":"How the tax amount is applied."},"Mappings.PassThroughTaxableBase":{"type":"string","enum":["base_price","pass_through_resort_fee","pass_through_community_fee","pass_through_management_fee","pass_through_linen_fee","pass_through_cleaning_fee","pass_through_pet_fee"],"description":"Charges the tax can be based on."},"Mappings.StandardFee":{"type":"object","required":["fee_type","amount_type","amount"],"properties":{"fee_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeType"}]},"offline":{"type":"boolean","description":"Whether the fee is charged offline. Defaults to `false` — the fee is charged at the time of booking."},"amount_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeAmountType"}]},"amount":{"type":"integer","format":"int32","minimum":0,"description":"For `amount_type: percent`, a value between 0 and 100 represented as an\ninteger. For `amount_type: flat`, an amount in major units of the listing\ncurrency."},"fee_unit_type":{"anyOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeUnitType"},{"type":"null"}],"description":"The unit the fee is measured in. Only applicable to fees charged each\ntime a measured unit is consumed (electricity, water, heat, air\nconditioning, or other utilities); the `amount_type` must be `flat`."},"charge_type":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeChargeType"}],"description":"Whether the fee applies per group, per person, or per pet. Defaults to `PER_GROUP`. `PER_PET` is available exclusively for `PASS_THROUGH_PET_FEE`."},"charge_period":{"allOf":[{"$ref":"#/components/schemas/Mappings.StandardFeeChargePeriod"}],"description":"The period the fee is charged for. Defaults to `PER_BOOKING`."}},"description":"A standard fee applied to the listing."},"Mappings.StandardFeeType":{"type":"string","enum":["PASS_THROUGH_RESORT_FEE","PASS_THROUGH_COMMUNITY_FEE","PASS_THROUGH_MANAGEMENT_FEE","PASS_THROUGH_LINEN_FEE","PASS_THROUGH_ELECTRICITY_FEE","PASS_THROUGH_WATER_FEE","PASS_THROUGH_HEATING_FEE","PASS_THROUGH_AIR_CONDITIONING_FEE","PASS_THROUGH_UTILITY_FEE","PASS_THROUGH_PET_FEE","PASS_THROUGH_CLEANING_FEE","PASS_THROUGH_SHORT_TERM_CLEANING_FEE","PASS_THROUGH_SECURITY_DEPOSIT"],"description":"Type of a standard fee. Some fees are a flat amount, some a percentage, and some are consumption fees charged each time a unit is consumed."},"Mappings.StandardFeeAmountType":{"type":"string","enum":["percent","flat"]},"Mappings.StandardFeeUnitType":{"type":"string","enum":["PER_KILOWATT_HOUR","PER_LITER","PER_CUBIC_METER"],"description":"Unit a consumption fee is measured in."},"Mappings.StandardFeeChargeType":{"type":"string","enum":["PER_GROUP","PER_PERSON","PER_PET"]},"Mappings.StandardFeeChargePeriod":{"type":"string","enum":["PER_BOOKING","PER_NIGHT"]},"Mappings.DefaultPricingRule":{"type":"object","required":["rule_type","price_change","threshold_one"],"properties":{"rule_type":{"$ref":"#/components/schemas/Mappings.DefaultPricingRuleType"},"price_change":{"type":"number","format":"double","minimum":0,"maximum":100,"description":"Price decrease in percent."},"threshold_one":{"type":"integer","format":"int32","minimum":0,"description":"The X value of the rule, in days. Must be a multiple of 28 or 30 for\n`BOOKED_BEYOND_AT_LEAST_X_DAYS`, and at most 28 for\n`BOOKED_WITHIN_AT_MOST_X_DAYS`."}},"description":"A default pricing rule applied to the listing."},"Mappings.DefaultPricingRuleType":{"type":"string","enum":["STAYED_AT_LEAST_X_DAYS","BOOKED_WITHIN_AT_MOST_X_DAYS","BOOKED_BEYOND_AT_LEAST_X_DAYS"],"description":"Type of a default pricing rule: `STAYED_AT_LEAST_X_DAYS` — long-term stay\ndiscount; `BOOKED_WITHIN_AT_MOST_X_DAYS` — last-minute discount;\n`BOOKED_BEYOND_AT_LEAST_X_DAYS` — booking-ahead discount."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Mappings.PricingSettingsUpdateRequest":{"type":"object","required":["pricing_settings"],"properties":{"pricing_settings":{"$ref":"#/components/schemas/Mappings.PricingSettingsInput"}},"description":"Request body of the pricing settings update."},"Mappings.PricingSettingsInput":{"type":"object","required":["currency","default_daily_price","guests_included","price_per_extra_person"],"properties":{"currency":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.currency"}],"description":"Listing currency in ISO 4217 format. Changing the currency is a separate update on Airbnb's side, performed automatically."},"default_daily_price":{"type":"integer","format":"int32","description":"Default nightly price of the listing, between 10 and 100,000 USD."},"weekend_price":{"type":"integer","format":"int32","description":"Nightly price to apply on weekend days, between 10 and 100,000 USD."},"guests_included":{"type":"integer","format":"int32","minimum":1,"description":"Number of guests permitted without additional fees. Infants (children under two years old) do not count towards the number of guests."},"price_per_extra_person":{"type":"integer","format":"int32","description":"Price per guest per night for each guest beyond `guests_included`, between 5 and 300 USD; `0` means no extra-person charge."},"pass_through_taxes":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.PassThroughTax"},"description":"Pass-through occupancy taxes to apply to the listing."},"standard_fees":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.StandardFee"},"description":"Standard fees to apply to the listing."},"default_pricing_rules":{"type":"array","items":{"$ref":"#/components/schemas/Mappings.DefaultPricingRule"},"description":"Default pricing rules to apply to the listing."}},"description":"Pricing settings to apply to a mapped listing."}}},"paths":{"/channels/{channel_id}/mappings/{id}/pricing_settings":{"put":{"operationId":"Mappings_updatePricingSettings","summary":"Update the pricing settings of a listing","description":"Update the Airbnb pricing settings of a mapped listing. The changes are\npushed to Airbnb, stored on the mapping, and followed by a full\nsynchronisation of the connection; settings identical to the stored ones\nare not re-sent. Returns the updated pricing settings.\n\nSupported for Airbnb channel connections; other channels receive\n`400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"id","in":"path","required":true,"description":"Mapping ID — see `rate_plans[].id` of the channel connection.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Mappings.AirbnbPricingSettingsResource"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request has missing or invalid arguments; `details` lists the reasons.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mappings.PricingSettingsUpdateRequest"}}}}}}}}
```

### Booking Settings

Instant Book rules, check-in and check-out times, cancellation policies, guest controls, listing expectations.

## Update the booking settings of a listing

> Update the booking settings of an Airbnb listing: Instant Book rules,\
> check-in and check-out times, cancellation policies, guest controls, and\
> the expectations guests must agree to before booking. The listing is\
> addressed by the rate plan mapping given in \`channel\_rate\_plan\_id\`.\
> \
> The settings are submitted to Airbnb, merged into the settings stored on\
> the mapping, and returned; an ARI synchronization of the mapping is\
> performed in the background. Submitting settings identical to the stored\
> ones succeeds without changes.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbBookingSettings":{"type":"object","properties":{"instant_booking_allowed_category":{"$ref":"#/components/schemas/Channels.AirbnbInstantBookingCategory"},"instant_book_welcome_message":{"type":"string","description":"Message guests must read and respond to before they confirm their\nreservation. Maximum 200 characters."},"check_in_time_start":{"type":"string","description":"Earliest time a guest can check in: an hour from `\"8\"` to `\"26\"`,\n`\"FLEXIBLE\"`, or `\"NOT_SELECTED\"`."},"check_in_time_end":{"type":"string","description":"Latest time a guest can check in: an hour from `\"8\"` to `\"27\"`,\n`\"FLEXIBLE\"`, or `\"NOT_SELECTED\"`."},"check_out_time":{"type":"integer","format":"int32","description":"Latest time a guest can check out: an hour between 0 and 23."},"cancellation_policy_settings":{"allOf":[{"$ref":"#/components/schemas/Channels.AirbnbCancellationPolicySettings"}],"description":"Cancellation policy settings of the listing."},"guest_controls":{"allOf":[{"$ref":"#/components/schemas/Channels.AirbnbGuestControls"}],"description":"Rules regarding children, pets, events, and smoking in the Host's space."},"listing_expectations_for_guests":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbListingExpectation"},"description":"Expectations about the Host's space that guests must agree to before booking."}},"description":"The booking settings stored for an Airbnb listing mapping: the settings of\nthe last update merged over the previously stored ones."},"Channels.AirbnbInstantBookingCategory":{"type":"string","enum":["everyone","well_reviewed_guests"],"description":"The category of guests that can create Instant Book reservations. Guests who\ndon't meet the requirement can send booking requests instead."},"Channels.AirbnbCancellationPolicySettings":{"type":"object","properties":{"cancellation_policy_category":{"$ref":"#/components/schemas/Channels.AirbnbCancellationPolicyCategory"},"lts_cancellation_policy_id":{"$ref":"#/components/schemas/Channels.AirbnbLtsCancellationPolicy"},"non_refundable_price_factor":{"anyOf":[{"type":"number","format":"double"},{"type":"null"}],"description":"Non-refundable discount factor, between 0 and 1. If set, the price\nmultiplied by this factor is offered to guests as a non-refundable rate\nalongside the standard rate."}},"description":"Cancellation policy settings of an Airbnb listing."},"Channels.AirbnbCancellationPolicyCategory":{"type":"string","enum":["flexible","moderate","better_strict_with_grace_period","strict_14_with_grace_period","super_strict_30","super_strict_60","firm_14","flexible_new","moderate_new","strict_new","super_strict_30_new","super_strict_60_new"],"description":"Cancellation policy for the listing.\n\n| Value | Policy name on Airbnb | Description |\n| --- | --- | --- |\n| `flexible` | Flexible | Guests can cancel at least 24 hours before check-in for a full refund. If canceling after check-in, the Host receives 100% for each night the guest stays, plus one additional night. |\n| `moderate` | Moderate | Guests can cancel at least five days before check-in for a full refund. If canceling after that, the Host receives 100% for each night the guest stays, plus one additional night, and 50% for all unspent nights. |\n| `better_strict_with_grace_period` | Firm | Guests can cancel at least 30 days before check-in for a full refund. If canceling between seven and 30 days before check-in, the Host receives 50% for all nights; less than seven days before check-in, 100% for all nights. If booked fewer than 30 days before check-in, guests can cancel within 48 hours of booking and at least 14 days before check-in for a full refund. |\n| `strict_14_with_grace_period` | Strict | Guests can cancel within 48 hours of booking and at least 14 days before check-in for a full refund. If canceling more than 14 days before check-in but not within 48 hours of booking, the Host receives 50% for all nights; between seven and 14 days before check-in, 50% for all nights. After that, the Host receives 100% for all nights. |\n| `super_strict_30` | Super Strict 30 Days | Guests can cancel at least 30 days before check-in for a 50% refund. After that, the Host receives 100% for all nights. |\n| `super_strict_60` | Super Strict 60 Days | Guests can cancel at least 60 days before check-in for a 50% refund. After that, the Host receives 100% for all nights. |\n| `firm_14` | Limited | Guests who cancel seven to 14 days before check-in get 50% back. After that, their trip is non-refundable. |\n\n`super_strict_30` and `super_strict_60` are deprecated: they are accepted\nonly when the listing already uses them — changing a listing to either is\nrejected.\n\nThe policies with the `_new` suffix are available only in Italy:\n\n| Value | Policy name on Airbnb | Description |\n| --- | --- | --- |\n| `flexible_new` | Flexible | Guests can cancel at least 24 hours before check-in for a full refund. If canceling within 24 hours of check-in and by 12PM local time, the Host receives 100% for the first night and the guest a full refund for the remaining nights. If canceling after check-in, before 12PM local time, the guest receives a full refund for unspent nights, excluding fees; after 12PM local time, excluding that night and fees. |\n| `moderate_new` | Moderate | Guests can cancel at least seven days before check-in for a full refund. If canceling within seven days before check-in and by 12PM local time, the Host receives 50% of the accommodation cost. If canceling after check-in, before 12PM local time, the Host receives 50% for each unspent night; after 12PM local time, 50% for each unspent night, including that night. |\n| `strict_new` | Strict | Guests can cancel at least 30 days before check-in for a full refund. If canceling within 30 days before check-in and by 12PM local time, the Host receives 50% of the accommodation cost. If canceling after check-in, before 12PM local time, the Host receives 50% for each unspent night; after 12PM local time, 50% for each unspent night, including that night. |\n| `super_strict_30_new` | Super Strict 30 Days | Guests can cancel at least 30 days before check-in for a full refund. If canceling within 30 days before check-in and by 12PM local time, the Host receives 100% of the accommodation cost, excluding fees. |\n| `super_strict_60_new` | Super Strict 60 Days | Guests can cancel at least 60 days before check-in for a full refund. If canceling within 60 days before check-in and by 12PM local time, the Host receives 100% of the accommodation cost, excluding fees. |"},"Channels.AirbnbLtsCancellationPolicy":{"type":"string","enum":["CANCEL_LONG_TERM_FAIR","CANCEL_LONG_TERM_WITH_GRACE_PERIOD"],"description":"Long-term cancellation policy, applied to stays of 28 nights or longer.\nNot supported for listings in Italy.\n\n| Value | Policy name on Airbnb | Description |\n| --- | --- | --- |\n| `CANCEL_LONG_TERM_FAIR` | Firm | Guests can cancel at least 30 days before check-in for a full refund. After that, the Host receives 100% for all nights spent, plus 30 additional nights. If fewer than 30 days remain on the reservation when the guest cancels, the Host receives 100% for the remaining nights. |\n| `CANCEL_LONG_TERM_WITH_GRACE_PERIOD` | Strict | Guests can cancel within 48 hours of booking and at least 28 days before check-in for a full refund. After that, the Host receives 100% for all nights spent, plus 30 additional nights. If fewer than 30 days remain on the reservation when the guest cancels, the Host receives 100% for the remaining nights. |"},"Channels.AirbnbGuestControls":{"type":"object","properties":{"allows_children_as_host":{"type":"boolean","description":"Whether the listing is suitable for children (2–12 years)."},"allows_infants_as_host":{"type":"boolean","description":"Whether the listing is suitable for infants (under 2 years)."},"children_not_allowed_details":{"type":"string","description":"Details explaining why the property may not be safe for children."},"allows_pets_as_host":{"type":"boolean","description":"Whether pets are allowed. Fees of type `PASS_THROUGH_PET_FEE` must be\nremoved from the listing before pets can be disallowed."},"pet_capacity":{"type":"integer","format":"int32","description":"Maximum number of pets the listing can accommodate: an integer from 1 to 5\nwhen pets are allowed (default 5), and 0 when they are not."},"allows_smoking_as_host":{"type":"boolean","description":"Whether smoking is allowed."},"allows_events_as_host":{"type":"boolean","description":"Whether parties or events are allowed."}},"description":"Rules regarding children, pets, events, and smoking in the Host's space."},"Channels.AirbnbListingExpectation":{"type":"object","required":["type"],"properties":{"type":{"$ref":"#/components/schemas/Channels.AirbnbListingExpectationType"},"added_details":{"type":"string","maxLength":300,"description":"Additional details of the expectation. Maximum 300 characters."}},"description":"An expectation about the Host's space that guests must agree to before booking."},"Channels.AirbnbListingExpectationType":{"type":"string","enum":["requires_stairs","potential_noise","has_pets","limited_parking","shared_spaces","limited_amenities","surveillance","noise_monitor","weapons","animals","pool_or_jacuzzi_with_no_fence","lake_or_river_or_water_body","climbing_or_play_structure","heights_with_no_fence"],"description":"The type of an expectation guests must agree to.\n\n| Value | Description |\n| --- | --- |\n| `requires_stairs` | Must climb stairs. Describe the stairs (for example, how many flights). |\n| `potential_noise` | Potential for noise. Describe the noise and when it's likely to take place. |\n| `has_pets` | Pet(s) live on property. Describe the pets. |\n| `limited_parking` | No parking on property. Describe the parking situation around the listing. |\n| `shared_spaces` | Some spaces are shared. Describe the spaces the guests will share. |\n| `limited_amenities` | Amenity limitations. Describe an amenity or service that's limited, such as weak wifi or limited hot water. |\n| `surveillance` | Surveillance or recording devices on property. Describe any device that records or sends video, audio, or still images; specify each device's location and whether it will be on or off. |\n| `noise_monitor` | Noise decibel monitor on property — a device that assesses sound levels and their duration without recording audio. Specify the device's location. Not currently displayed to guests on Airbnb. |\n| `weapons` | Weapons on property. Describe any weapons (firearms, airguns, tasers, etc.), their location, and how they're secured. |\n| `animals` | Dangerous animals on property. Describe any domesticated or wild animals that could be a health or safety risk to guests or other animals. |\n| `pool_or_jacuzzi_with_no_fence` | Pool or hot tub without a gate or lock. Describe the pool or hot tub and how guests will have access to it. |\n| `lake_or_river_or_water_body` | Nearby lake, river, or other body of water. Describe the body of water, its location, and how guests will have access to it. |\n| `climbing_or_play_structure` | Climbing or play structure. Describe the climbing or play structure. |\n| `heights_with_no_fence` | Heights without rails or protection. Describe the unprotected elevated area and how guests will have access to it. |"},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Channels.AirbnbBookingSettingsUpdateRequest":{"type":"object","required":["channel_rate_plan_id","data"],"properties":{"channel_rate_plan_id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Rate plan mapping ID of the listing — the `rate_plans[].id` of the channel connection."},"data":{"allOf":[{"$ref":"#/components/schemas/Channels.AirbnbBookingSettingsInput"}],"description":"The booking settings to apply."}},"description":"Booking settings update for an Airbnb listing."},"Channels.AirbnbBookingSettingsInput":{"type":"object","required":["instant_booking_allowed_category"],"properties":{"instant_booking_allowed_category":{"$ref":"#/components/schemas/Channels.AirbnbInstantBookingCategory"},"instant_book_welcome_message":{"type":"string","description":"Message guests must read and respond to before they confirm their\nreservation. Maximum 200 characters."},"check_in_time_start":{"type":"string","description":"Earliest time a guest can check in: an hour from `\"8\"` to `\"26\"`,\n`\"FLEXIBLE\"`, or `\"NOT_SELECTED\"`."},"check_in_time_end":{"type":"string","description":"Latest time a guest can check in: an hour from `\"8\"` to `\"27\"`,\n`\"FLEXIBLE\"`, or `\"NOT_SELECTED\"`."},"check_out_time":{"type":"integer","format":"int32","description":"Latest time a guest can check out: an hour between 0 and 23."},"cancellation_policy_settings":{"allOf":[{"$ref":"#/components/schemas/Channels.AirbnbCancellationPolicySettings"}],"description":"Cancellation policy settings of the listing."},"guest_controls":{"allOf":[{"$ref":"#/components/schemas/Channels.AirbnbGuestControls"}],"description":"Rules regarding children, pets, events, and smoking in the Host's space."},"listing_expectations_for_guests":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbListingExpectation"},"description":"Expectations about the Host's space that guests must agree to before booking."}},"description":"Booking settings to apply to the Airbnb listing."}}},"paths":{"/channels/{channel_id}/execute/update_booking_setting":{"put":{"operationId":"Channels_updateAirbnbBookingSettings","summary":"Update the booking settings of a listing","description":"Update the booking settings of an Airbnb listing: Instant Book rules,\ncheck-in and check-out times, cancellation policies, guest controls, and\nthe expectations guests must agree to before booking. The listing is\naddressed by the rate plan mapping given in `channel_rate_plan_id`.\n\nThe settings are submitted to Airbnb, merged into the settings stored on\nthe mapping, and returned; an ARI synchronization of the mapping is\nperformed in the background. Submitting settings identical to the stored\nones succeeds without changes.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbBookingSettings"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request has missing or invalid arguments; `details` lists the reasons.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.AirbnbBookingSettingsUpdateRequest"}}}}}}}}
```

## Promotions

List the promotions of the connection's listings, and enable or disable one on a listing.

## List promotions

> List the promotions of the channel connection's Airbnb listings. The\
> promotions are requested from Airbnb for every mapped listing and merged\
> with the promotions recorded on the connection's rate plan mappings.\
> \
> For Airbnb channel connections; other channels receive \`403 Forbidden\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.PromotionResource":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["promotion"]},"attributes":{"$ref":"#/components/schemas/Channels.Promotion"}},"description":"A promotion resource of an Airbnb listing."},"Channels.Promotion":{"type":"object","required":["status","type","listing_id"],"properties":{"status":{"type":"string","description":"Status of the promotion. Possible values: `AVAILABLE` — the promotion can be enabled; `ONGOING` — the promotion is active; `EXPIRED` — the promotion is no longer available."},"type":{"type":"string","description":"Type of the promotion. Possible values: `NEW_LISTING_PROMOTION`, `HIGH_RATED_GUEST_DISCOUNT`, `MOBILE_ONLY_DISCOUNT`."},"listing_id":{"type":"string","description":"Airbnb listing ID the promotion applies to."}},"description":"A promotion of an Airbnb listing."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/promotions":{"get":{"operationId":"Channels_promotions","summary":"List promotions","description":"List the promotions of the channel connection's Airbnb listings. The\npromotions are requested from Airbnb for every mapped listing and merged\nwith the promotions recorded on the connection's rate plan mappings.\n\nFor Airbnb channel connections; other channels receive `403 Forbidden`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channels.PromotionResource"}}},"description":"A plain data-array envelope without pagination — used by reference/dictionary endpoints."}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"]}}}}
```

## Enable a promotion

> Enable a promotion on an Airbnb listing of the channel connection. The\
> promotion is submitted to Airbnb; the response reports it as \`ONGOING\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.PromotionResource":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["promotion"]},"attributes":{"$ref":"#/components/schemas/Channels.Promotion"}},"description":"A promotion resource of an Airbnb listing."},"Channels.Promotion":{"type":"object","required":["status","type","listing_id"],"properties":{"status":{"type":"string","description":"Status of the promotion. Possible values: `AVAILABLE` — the promotion can be enabled; `ONGOING` — the promotion is active; `EXPIRED` — the promotion is no longer available."},"type":{"type":"string","description":"Type of the promotion. Possible values: `NEW_LISTING_PROMOTION`, `HIGH_RATED_GUEST_DISCOUNT`, `MOBILE_ONLY_DISCOUNT`."},"listing_id":{"type":"string","description":"Airbnb listing ID the promotion applies to."}},"description":"A promotion of an Airbnb listing."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Channels.PromotionActionRequest":{"type":"object","required":["promotion"],"properties":{"promotion":{"$ref":"#/components/schemas/Channels.PromotionCommand"}},"description":"Request body of the promotion enable and disable actions."},"Channels.PromotionCommand":{"type":"object","required":["type","listing_id"],"properties":{"type":{"type":"string","description":"Type of the promotion. Possible values: `NEW_LISTING_PROMOTION`, `HIGH_RATED_GUEST_DISCOUNT`, `MOBILE_ONLY_DISCOUNT`."},"listing_id":{"type":"string","description":"Airbnb listing ID to enable or disable the promotion on."}},"description":"The promotion to enable or disable."}}},"paths":{"/channels/{channel_id}/promotions/enable":{"post":{"operationId":"Channels_enablePromotion","summary":"Enable a promotion","description":"Enable a promotion on an Airbnb listing of the channel connection. The\npromotion is submitted to Airbnb; the response reports it as `ONGOING`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.PromotionResource"}},"description":"JSON:API document wrapping a single resource."}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.PromotionActionRequest"}}}}}}}}
```

## Disable a promotion

> Disable a promotion on an Airbnb listing of the channel connection. The\
> promotion is withdrawn from Airbnb; the response reports it as\
> \`AVAILABLE\` again.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.PromotionResource":{"type":"object","required":["type","attributes"],"properties":{"type":{"type":"string","enum":["promotion"]},"attributes":{"$ref":"#/components/schemas/Channels.Promotion"}},"description":"A promotion resource of an Airbnb listing."},"Channels.Promotion":{"type":"object","required":["status","type","listing_id"],"properties":{"status":{"type":"string","description":"Status of the promotion. Possible values: `AVAILABLE` — the promotion can be enabled; `ONGOING` — the promotion is active; `EXPIRED` — the promotion is no longer available."},"type":{"type":"string","description":"Type of the promotion. Possible values: `NEW_LISTING_PROMOTION`, `HIGH_RATED_GUEST_DISCOUNT`, `MOBILE_ONLY_DISCOUNT`."},"listing_id":{"type":"string","description":"Airbnb listing ID the promotion applies to."}},"description":"A promotion of an Airbnb listing."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Channels.PromotionActionRequest":{"type":"object","required":["promotion"],"properties":{"promotion":{"$ref":"#/components/schemas/Channels.PromotionCommand"}},"description":"Request body of the promotion enable and disable actions."},"Channels.PromotionCommand":{"type":"object","required":["type","listing_id"],"properties":{"type":{"type":"string","description":"Type of the promotion. Possible values: `NEW_LISTING_PROMOTION`, `HIGH_RATED_GUEST_DISCOUNT`, `MOBILE_ONLY_DISCOUNT`."},"listing_id":{"type":"string","description":"Airbnb listing ID to enable or disable the promotion on."}},"description":"The promotion to enable or disable."}}},"paths":{"/channels/{channel_id}/promotions/disable":{"post":{"operationId":"Channels_disablePromotion","summary":"Disable a promotion","description":"Disable a promotion on an Airbnb listing of the channel connection. The\npromotion is withdrawn from Airbnb; the response reports it as\n`AVAILABLE` again.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.PromotionResource"}},"description":"JSON:API document wrapping a single resource."}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}]}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.PromotionActionRequest"}}}}}}}}
```

## Opportunities

Airbnb suggests per-listing improvements and discount programs — opportunities. List them and apply one to listings:

## List opportunities

> List the Airbnb opportunities available to the connection's listings:\
> suggested improvements and discount programs, each with its input fields,\
> their value constraints, the listings it applies to, and the share of\
> listings that already completed it. The opportunities are requested from\
> Airbnb, all pages included.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbOpportunityList":{"type":"object","required":["opportunities"],"properties":{"opportunities":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbOpportunity"}}},"description":"The Airbnb opportunities available to the connection's listings."},"Channels.AirbnbOpportunity":{"type":"object","required":["id","type","title","description","input_fields","activation_modes","activation_url","applicable_listing_ids","host_completion_percentage"],"properties":{"id":{"type":"string","description":"Opportunity identifier — the `opportunity` of an apply request."},"type":{"type":"string","description":"Opportunity type."},"title":{"type":"string","description":"Short title of the opportunity."},"description":{"type":"string","description":"What the opportunity does."},"input_fields":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbOpportunityField"},"description":"The input fields an application of this opportunity takes. Empty when it needs none."},"activation_modes":{"type":"array","items":{"type":"string"},"description":"How the opportunity can be activated."},"activation_url":{"type":"string","description":"Airbnb page where the opportunity can be activated manually."},"applicable_listing_ids":{"type":"array","items":{"type":"string"},"description":"Listings the opportunity applies to."},"host_completion_percentage":{"type":"integer","format":"int32","description":"Share of the connection's listings that already completed the opportunity, in percent."}},"description":"An Airbnb opportunity: a suggested listing improvement or discount program."},"Channels.AirbnbOpportunityField":{"type":"object","required":["key","value_constraint"],"properties":{"key":{"type":"string","description":"Field key. Submitted in `input_fields` with dots replaced by double underscores."},"key_label":{"type":"string","description":"Human-readable field label."},"value_constraint":{"allOf":[{"$ref":"#/components/schemas/Channels.AirbnbOpportunityConstraint"}],"description":"Constraints on the field's value."}},"description":"An input field of an opportunity."},"Channels.AirbnbOpportunityConstraint":{"type":"object","required":["value_type"],"properties":{"value_type":{"type":"string","description":"Kind of value the field takes."},"min_value":{"type":"string","description":"Minimum allowed value."},"max_value":{"type":"string","description":"Maximum allowed value."},"options":{"type":"array","items":{"type":"string"},"description":"The allowed values, for option fields."}},"description":"Value constraints of an opportunity input field."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/action/get_opportunities":{"get":{"operationId":"Channels_airbnbOpportunities","summary":"List opportunities","description":"List the Airbnb opportunities available to the connection's listings:\nsuggested improvements and discount programs, each with its input fields,\ntheir value constraints, the listings it applies to, and the share of\nlistings that already completed it. The opportunities are requested from\nAirbnb, all pages included.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbOpportunityList"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"]}}}}
```

## Apply an opportunity

> Apply an Airbnb opportunity to listings of the channel connection. The\
> application is submitted to Airbnb with the values given in\
> \`input\_fields\`, where the opportunity defines any.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbOpportunityApplyResult":{"type":"object","unevaluatedProperties":{},"description":"Airbnb's response to the opportunity application. Reports `success: true` when the opportunity is applied."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."},"Channels.AirbnbOpportunityApplyRequest":{"type":"object","required":["opportunity"],"properties":{"opportunity":{"$ref":"#/components/schemas/Channels.AirbnbOpportunityCommand"}},"description":"Request payload of an opportunity application."},"Channels.AirbnbOpportunityCommand":{"type":"object","required":["opportunity","listing_ids"],"properties":{"opportunity":{"type":"string","description":"Opportunity identifier — the `id` from the opportunities list."},"listing_ids":{"type":"array","items":{"type":"string"},"description":"Listings to apply the opportunity to."},"input_fields":{"type":"object","unevaluatedProperties":{},"description":"Values for the opportunity's input fields: a map of field key to value.\nDots in field keys are written as double underscores —\n`losSettings.minNights` is submitted as `losSettings__minNights`."}},"description":"The opportunity to apply and its parameters."}}},"paths":{"/channels/{channel_id}/action/apply_opportunity":{"post":{"operationId":"Channels_airbnbApplyOpportunity","summary":"Apply an opportunity","description":"Apply an Airbnb opportunity to listings of the channel connection. The\napplication is submitted to Airbnb with the values given in\n`input_fields`, where the opportunity defines any.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbOpportunityApplyResult"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.AirbnbOpportunityApplyRequest"}}}}}}}}
```

## Checkout Tasks

What departing guests are asked to do — read and update per listing:

## Retrieve the checkout tasks of a listing

> Retrieve the checkout tasks of an Airbnb listing — what departing guests\
> are asked to do. The tasks are requested from Airbnb and keyed by their\
> canonical uppercase names (\`RETURN\_KEYS\`, \`TURN\_THINGS\_OFF\`, …); tasks\
> that were never set are absent.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbCheckoutTasks":{"type":"object","required":["checkout_tasks"],"properties":{"checkout_tasks":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Channels.AirbnbCheckoutTask"}}},"description":"The checkout tasks of an Airbnb listing, keyed by task. The tasks:\n`return_keys`, `turn_things_off`, `throw_trash`, `lock_up`,\n`gather_towels`, `additional_requests`."},"Channels.AirbnbCheckoutTask":{"type":"object","required":["is_present"],"properties":{"is_present":{"type":"boolean","description":"Whether the task is asked of departing guests."},"task_detail":{"type":"string","description":"Details of the task shown to guests."}},"description":"A checkout task of an Airbnb listing."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/action/get_checkout_tasks":{"get":{"operationId":"Channels_airbnbCheckoutTasks","summary":"Retrieve the checkout tasks of a listing","description":"Retrieve the checkout tasks of an Airbnb listing — what departing guests\nare asked to do. The tasks are requested from Airbnb and keyed by their\ncanonical uppercase names (`RETURN_KEYS`, `TURN_THINGS_OFF`, …); tasks\nthat were never set are absent.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"listing_id","in":"query","required":true,"description":"Airbnb listing ID.","schema":{"type":"string"},"explode":false}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbCheckoutTasks"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"]}}}}
```

## Update the checkout tasks of a listing

> Update the checkout tasks of an Airbnb listing. The submitted map is sent\
> to Airbnb as the complete set of tasks, keyed by the lowercase task names\
> (\`return\_keys\`, \`turn\_things\_off\`, \`throw\_trash\`, \`lock\_up\`,\
> \`gather\_towels\`, \`additional\_requests\`); the response returns the\
> submitted tasks.\
> \
> For Airbnb channel connections; other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbCheckoutTasks":{"type":"object","required":["checkout_tasks"],"properties":{"checkout_tasks":{"type":"object","unevaluatedProperties":{"$ref":"#/components/schemas/Channels.AirbnbCheckoutTask"}}},"description":"The checkout tasks of an Airbnb listing, keyed by task. The tasks:\n`return_keys`, `turn_things_off`, `throw_trash`, `lock_up`,\n`gather_towels`, `additional_requests`."},"Channels.AirbnbCheckoutTask":{"type":"object","required":["is_present"],"properties":{"is_present":{"type":"boolean","description":"Whether the task is asked of departing guests."},"task_detail":{"type":"string","description":"Details of the task shown to guests."}},"description":"A checkout task of an Airbnb listing."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/action/update_checkout_tasks":{"post":{"operationId":"Channels_airbnbUpdateCheckoutTasks","summary":"Update the checkout tasks of a listing","description":"Update the checkout tasks of an Airbnb listing. The submitted map is sent\nto Airbnb as the complete set of tasks, keyed by the lowercase task names\n(`return_keys`, `turn_things_off`, `throw_trash`, `lock_up`,\n`gather_towels`, `additional_requests`); the response returns the\nsubmitted tasks.\n\nFor Airbnb channel connections; other channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"listing_id","in":"query","required":true,"description":"Airbnb listing ID.","schema":{"type":"string"},"explode":false}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbCheckoutTasks"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.AirbnbCheckoutTasks"}}}}}}}}
```

## Listing Calendar API

## Retrieve the calendar of a listing

> Retrieve the availability and pricing calendar of an Airbnb listing for a\
> date range, day by day: availability with its type and sub-type, price,\
> stay restrictions, and closed-to-arrival and closed-to-departure flags.\
> \
> The calendar is requested from Airbnb. For Airbnb channel connections;\
> other channels receive \`400 Bad Request\`.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Channels","version":"0.0.0"},"tags":[{"name":"Airbnb","description":"Airbnb-specific operations of channel connections: authorization, the listing settings stored on the rate plan mappings (pricing, availability, and booking settings), and listing promotions."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"Channels.AirbnbListingCalendarResult":{"type":"object","required":["calendar"],"properties":{"calendar":{"$ref":"#/components/schemas/Channels.AirbnbListingCalendar"},"success":{}},"description":"The availability and pricing calendar of an Airbnb listing."},"Channels.AirbnbListingCalendar":{"type":"object","required":["days","start_date","end_date","host_id","host_id_str","listing_currency","listing_id","listing_id_str"],"properties":{"days":{"type":"array","items":{"$ref":"#/components/schemas/Channels.AirbnbCalendarDay"},"description":"The days of the requested range."},"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"},"host_id":{"type":"integer","format":"int64","description":"Airbnb host account ID."},"host_id_str":{"type":"string","description":"Airbnb host account ID as a string."},"listing_currency":{"type":"string","description":"Currency of the listing's prices."},"listing_id":{"type":"integer","format":"int64","description":"Airbnb listing ID."},"listing_id_str":{"type":"string","description":"Airbnb listing ID as a string."}},"description":"A listing calendar over a date range."},"Channels.AirbnbCalendarDay":{"type":"object","required":["date","availability","availability_type","availability_sub_type","available_count","closed_to_arrival","closed_to_departure","daily_price","max_nights","min_nights","notes"],"properties":{"date":{"type":"string","format":"date"},"availability":{"type":"string","description":"Whether the day is available for booking."},"availability_type":{"type":"string","description":"Availability type of the day."},"availability_sub_type":{"type":"string","description":"Availability sub-type of the day."},"available_count":{"type":"integer","format":"int32","description":"Rooms available to sell on the day."},"closed_to_arrival":{"type":"boolean"},"closed_to_departure":{"type":"boolean"},"daily_price":{"type":"number","format":"double","description":"Price of the day."},"max_nights":{"type":"integer","format":"int32","description":"Maximum length of stay for arrivals on the day."},"min_nights":{"type":"integer","format":"int32","description":"Minimum length of stay for arrivals on the day."},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Host notes for the day. `null` when there are none."}},"description":"One day of an Airbnb listing calendar."},"Common.Errors.BadRequest":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The request cannot be processed in the current state."},"Common.Errors.BadRequestWithReasons":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.BadRequestReasonsObject"}},"description":"The request has missing or invalid arguments; `details` lists the reasons."},"Common.Errors.BadRequestReasonsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"array","items":{"type":"string"},"description":"Human-readable reasons the request could not be processed."}},"description":"Error object for a bad request, adding a list of human-readable reasons."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Channels.ChannelActionFailure":{"type":"object","required":["errors"],"properties":{"errors":{}},"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none."},"Common.Errors.ServiceUnavailable":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["service_unavailable"]},"title":{"type":"string","enum":["Service Temporary Unavailable"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"A backing service is temporarily unavailable; retry the request later."}}},"paths":{"/channels/{channel_id}/action/get_listing_calendar":{"get":{"operationId":"Channels_airbnbListingCalendar","summary":"Retrieve the calendar of a listing","description":"Retrieve the availability and pricing calendar of an Airbnb listing for a\ndate range, day by day: availability with its type and sub-type, price,\nstay restrictions, and closed-to-arrival and closed-to-departure flags.\n\nThe calendar is requested from Airbnb. For Airbnb channel connections;\nother channels receive `400 Bad Request`.","parameters":[{"name":"channel_id","in":"path","required":true,"description":"Channel connection ID.","schema":{"$ref":"#/components/schemas/Common.Scalars.id"}},{"name":"listing_id","in":"query","required":true,"description":"Airbnb listing ID.","schema":{"type":"string"},"explode":false},{"name":"date_from","in":"query","required":true,"description":"First day of the range.","schema":{"type":"string","format":"date"},"explode":false},{"name":"date_to","in":"query","required":true,"description":"Last day of the range.","schema":{"type":"string","format":"date"},"explode":false}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/Channels.AirbnbListingCalendarResult"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request cannot be processed in the current state.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.BadRequest"},{"$ref":"#/components/schemas/Common.Errors.BadRequestWithReasons"}]}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The channel could not return the details; `errors` carries the reason the channel reported, or `null` when it gave none.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Channels.ChannelActionFailure"}}}},"503":{"description":"A backing service is temporarily unavailable; retry the request later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.ServiceUnavailable"}}}}},"tags":["Airbnb"]}}}}
```

## Airbnb Booking Requests

Most Airbnb reservations are instant: the guest books, and the booking reaches you as a regular new booking. Three situations instead produce a **request that waits for your decision**:

| Request                 | What the guest wants                         | Your options                        |
| ----------------------- | -------------------------------------------- | ----------------------------------- |
| **Inquiry**             | Asked about a stay without booking it        | Pre-approve or send a special offer |
| **Reservation request** | Asked to book, rather than booking instantly | Accept or decline                   |
| **Alteration request**  | Asked to change an existing booking          | Accept, decline, or cancel          |

All three arrive as live feed events and are answered through a single endpoint: `POST /api/v1/live_feed/{id}/resolve`.

### Receiving requests

Requests reach you in two ways, and both refer to the same live feed event.

#### Webhooks

Subscribe a webhook to the event kinds you handle:

| Webhook event          | Fires when                             |
| ---------------------- | -------------------------------------- |
| `inquiry`              | A guest inquiry needs an answer        |
| `reservation_request`  | A reservation request needs a decision |
| `alteration_request`   | An alteration request needs a decision |
| `accepted_reservation` | A reservation request was accepted     |
| `declined_reservation` | A reservation request was declined     |

See the Webhooks resource for creating and testing subscriptions.

#### Live Feed API

Poll or re-read requests directly:

```http
GET /api/v1/live_feed?filter[event]=reservation_request
GET /api/v1/live_feed/{id}
```

`GET /api/v1/live_feed` is paginated and also accepts `filter[property_id]`, `filter[channel_id]`, `filter[group_id]` and `order[inserted_at]`. Events are returned newest first.

Every resolvable event carries `payload.resolved`. Once a decision has been made, `payload.resolution` and `payload.comment` record the outcome and who made it.

Inquiries additionally appear as a system message in the guest's message thread; that message's `meta` carries the `live_feed_event_id` of the inquiry, so a messaging integration can answer an inquiry from the thread it arrived in. See the Message Threads resource.

### Answering a request

Every answer is the same call — the event ID in the path, a `resolution` object in the body:

```http
POST /api/v1/live_feed/9a52c05b-ea75-4fad-aaab-21741c3be253/resolve HTTP/1.1
Host: app.channex.io
Content-Type: application/json
user-api-key: <API_KEY>

{
  "resolution": {
    "accept": true
  }
}
```

What goes into `resolution` depends on the request you are answering. All supported decisions:

| Request kind        | Decision             | `resolution`                                             |
| ------------------- | -------------------- | -------------------------------------------------------- |
| Reservation request | Accept               | `{"accept": true}`                                       |
| Reservation request | Decline              | `{"accept": false, "reason": "dates_not_available"}`     |
| Inquiry             | Pre-approve          | `{"type": "preapproval", "block_instant_booking": true}` |
| Inquiry             | Send a special offer | `{"type": "special_offer", "total_price": 450}`          |
| Alteration request  | Accept               | `{"accept": "accept"}`                                   |
| Alteration request  | Decline              | `{"accept": "decline"}`                                  |
| Alteration request  | Withdraw the request | `{"accept": "cancel"}`                                   |

Note that `accept` is a boolean for reservation requests and a string for alteration requests, and that an inquiry is answered with `type` rather than `accept`. Optional fields — decline messages, `block_instant_booking` — are covered in the section for each request kind below.

The response is the event itself, with `payload` updated to reflect the decision:

```json
{
  "data": {
    "id": "9a52c05b-ea75-4fad-aaab-21741c3be253",
    "type": "live_feed_event",
    "attributes": {
      "id": "9a52c05b-ea75-4fad-aaab-21741c3be253",
      "event": "reservation_request",
      "property_id": "3e8f5809-3a1e-4f80-90a2-38d33e37b317",
      "inserted_at": "2026-04-15T20:00:11.416184",
      "payload": {
        "bms": { "…": "the requested booking, in booking revision format" },
        "message_thread_id": "6d0f3fd0-9b93-4b2f-9fe3-6f2a3f6a1c07",
        "resolved": true,
        "resolution": "accepted",
        "comment": "Accepted by Jane Doe (jane@example.com) at 2026-04-15 20:04:22Z"
      }
    }
  }
}
```

Rules that apply to every kind of request:

* **Only the three request kinds above can be resolved.** Any other event kind is rejected with `422 not_supported`.
* **A decision is final.** Resolving an event that is already resolved returns it unchanged, so a decision cannot be revised afterwards.
* **Fields belonging to another request kind are ignored**, so a stray field will not raise an error — double-check you sent the right one.

#### Errors

| Status                 | Meaning                                                |
| ---------------------- | ------------------------------------------------------ |
| `401`                  | Missing or invalid API key                             |
| `404`                  | No live feed event with this ID is visible to you      |
| `422 bad_request`      | The request body is malformed                          |
| `422 validation_error` | The resolution was rejected                            |
| `422 not_supported`    | This event kind cannot be resolved                     |
| `503`                  | The channel service is temporarily unavailable — retry |

### Reservation request

A reservation request (also called Request to Book) is a guest asking to book instead of booking instantly. **You have 24 hours to answer.** Airbnb blocks the requested dates for that window so the stay cannot be double-sold while you decide.

Connected listings are instant-book by default, but a request still arrives when, for example:

* the guest books within 48 hours of check-in and picks a custom check-in window outside the listing's check-in times;
* the guest books inside the listing's booking lead time;
* the guest does not meet the guest requirements set for instant bookings;
* the requested stay is longer than the maximum nights allowed for instant bookings, or longer than a seasonal rule permits;
* the booking falls in an extended availability window or a period opened by an availability override;
* Airbnb flags the booking as a party risk, or the listing is set up for requests only.

#### Event payload

```json
{
  "attributes": {
    "event": "reservation_request",
    "property_id": "3e8f5809-3a1e-4f80-90a2-38d33e37b317",
    "payload": {
      "bms": { "…": "the requested booking, in booking revision format" },
      "message_thread_id": "6d0f3fd0-9b93-4b2f-9fe3-6f2a3f6a1c07",
      "resolved": false
    }
  }
}
```

`bms` describes the stay being requested — dates, rooms, guests and prices — in the same attribute format as a booking revision. See the Booking Revisions resource.

#### Accept

```json
{
  "resolution": {
    "accept": true
  }
}
```

Accepting triggers a charge on the guest's payment method. If the charge fails, the guest gets 24 hours to fix it before the request is voided. Airbnb then re-checks availability and confirms the stay.

Two notifications follow, and they arrive at different times:

1. **`accepted_reservation`** — immediately, confirming your decision was passed to Airbnb.
2. **`booking_new`** (plus the generic `booking` webhook) — once Airbnb confirms the stay, which is when the booking itself is created. Until then no booking exists in Channex.

#### Decline

```json
{
  "resolution": {
    "accept": false,
    "reason": "dates_not_available",
    "decline_message_to_guest": "Sorry, we are fully booked that week.",
    "decline_message_to_airbnb": "Dates already sold on another channel."
  }
}
```

| Field                       | Description                                                                                                                                        |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `accept`                    | `false` to decline                                                                                                                                 |
| `reason`                    | Why you are declining: `dates_not_available`, `not_a_good_fit`, `waiting_for_better_reservation`, `not_comfortable`. Defaults to `not_comfortable` |
| `decline_message_to_guest`  | Shown to the guest                                                                                                                                 |
| `decline_message_to_airbnb` | Sent to Airbnb only                                                                                                                                |

Declining sends a `declined_reservation` webhook. No booking is created.

> **The dates may stay blocked.** If you decline because the dates are unavailable, or let the request expire without answering, Airbnb keeps the dates blocked until you make them available again. Declines for other reasons release the dates.

Once resolved, the event's `payload.resolution` reads `accepted` or `declined`, and `payload.comment` records who decided and when.

### Inquiry

An inquiry is a guest who picked dates and messaged you instead of booking. You answer it with a **pre-approval** or a **special offer** — those are the only two answers — and the guest has 24 hours to accept, which confirms the reservation immediately. To turn a guest down, leave the message unanswered.

#### Event payload

```json
{
  "attributes": {
    "event": "inquiry",
    "property_id": "3e8f5809-3a1e-4f80-90a2-38d33e37b317",
    "payload": {
      "booking_details": {
        "listing_id": "1234567",
        "checkin_date": "2026-09-07",
        "nights": 3,
        "currency": "EUR",
        "guest_name": "David",
        "property_id": "3e8f5809-3a1e-4f80-90a2-38d33e37b317",
        "room_type_id": "0d9e1f11-1f1a-4f3d-9d1a-9b1e2c3d4e5f"
      },
      "status": "accepted",
      "message_thread_id": "6d0f3fd0-9b93-4b2f-9fe3-6f2a3f6a1c07",
      "resolved": false
    }
  }
}
```

`booking_details` holds the stay the guest asked about, including guest counts and the listing currency. `status` carries the inquiry's status as it arrived from Airbnb; once you answer, it names what you sent instead.

#### Pre-approval

An invitation to book at the listing's current price, for exactly the dates and guest count in the inquiry:

```json
{
  "resolution": {
    "type": "preapproval",
    "block_instant_booking": true
  }
}
```

| Field                   | Description                                                                                                                |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `type`                  | `preapproval`                                                                                                              |
| `block_instant_booking` | Blocks other guests from taking the same dates through Instant Book while the pre-approval is pending. Defaults to `false` |

Things to know about pre-approvals:

* You cannot change the price, dates or guest count — only the guest's own inquiry terms can be pre-approved.
* The resulting reservation shows a single total instead of a fee breakdown; only the cleaning fee is itemised.
* Because there is no breakdown, later alterations to such a reservation do not recalculate standard fees. Be careful when altering a pre-approved booking.

#### Special offer

A custom price for the stay, which may also differ from the inquiry in dates:

```json
{
  "resolution": {
    "type": "special_offer",
    "total_price": 450
  }
}
```

| Field         | Description                                                                         |
| ------------- | ----------------------------------------------------------------------------------- |
| `type`        | `special_offer`                                                                     |
| `total_price` | Required. Total price of the whole stay as a whole number in the listing's currency |

Things to know about special offers:

* `total_price` is a whole number in the listing's currency and must cover **all nights and all standard fees**, including the cleaning fee. Airbnb does not apply the listing's pricing rules to it and does not add fees on top.
* Do **not** include taxes or a security deposit.
* The Airbnb service fee is deducted from this amount — you receive the price you set minus that fee.
* The listing's availability rules still apply, so check them before sending the offer.
* `block_instant_booking` does not apply to special offers.
* A special offer carries a total guest count, not a per-category breakdown.

#### After you answer

* **An inquiry has only these two outcomes.** There is no way to decline one: if you do not want the guest, leave the message unanswered and the inquiry lapses on its own.
* The guest has **24 hours** to accept. An offer cannot be withdrawn or changed afterwards.
* If the guest accepts, the stay arrives as an ordinary **new booking** (`booking_new`) — there is no event that ties it back to the offer.
* Nothing is delivered when an offer expires or the guest declines it.
* If you send a second offer without the first being accepted, the guest only sees the most recent one; the earlier offer cannot be accepted and expires within 24 hours.
* Sending offers for the same dates to several guests is possible; the first guest to accept gets the booking.

Once answered, the event's `payload.status` names what you sent (`preapproval` or `special_offer`), `payload.resolution` holds the resolution you submitted, and `payload.comment` records who answered and when.

### Alteration request

An alteration request is a guest asking to change a booking that is already confirmed — its dates, guest count or price.

#### Event payload

```json
{
  "attributes": {
    "event": "alteration_request",
    "property_id": "3e8f5809-3a1e-4f80-90a2-38d33e37b317",
    "payload": {
      "id": "1092837465",
      "bms": { "…": "the altered booking, in booking revision format" },
      "resolved": false
    }
  }
}
```

`bms` describes the booking **as it would be after the change**, and carries the `booking_id` of the booking being altered, so you can compare it against what you hold. See the Booking Revisions resource.

#### Accept, decline or cancel

Unlike a reservation request, `accept` here takes a string:

```json
{
  "resolution": {
    "accept": "accept"
  }
}
```

| Value       | Effect                                                                            |
| ----------- | --------------------------------------------------------------------------------- |
| `"accept"`  | The change is applied                                                             |
| `"decline"` | The guest's request is refused; the booking stays as it is                        |
| `"cancel"`  | The request is withdrawn rather than answered, which Airbnb records as `CANCELED` |

Use `decline` to refuse a change a guest asked for; `cancel` withdraws an alteration that originated on your side.

Once resolved, the event's `payload.status` reports the outcome as `ACCEPTED`, `DECLINED` or `CANCELED`, and `payload.comment` records who decided and when. `payload.resolution` holds the value you sent — or `accepted` / `cancelled` when the request was resolved on Airbnb instead.

#### What follows

* **Accepting** does not create a new booking. Once Airbnb confirms the change, the existing booking is updated with a new revision, and you receive `booking_modification` (plus the generic `booking` webhook). Compare the new revision against what you hold to see what changed.
* **Declining or cancelling** sends no notification at all. The only record of the outcome is the live feed event itself, so re-read it with `GET /api/v1/live_feed/{id}` to confirm your decision was stored.
* **The guest can also withdraw the request** on Airbnb before you answer. The event is then marked resolved on its own, again without a notification, so an unanswered request is worth re-reading before acting on it.

### Related resources

* **Live Feed** — listing, reading and resolving events.
* **Webhooks** — subscribing to request notifications.
* **Booking Revisions** — the `bms` format used by reservation and alteration requests.
* **Message Threads** — the guest conversation an inquiry or request arrived in.
* **Bookings** — the booking created when a request or offer is accepted.
