Update Inventory
const url = 'https://api.wink.travel/api/managing-entity//extranet/sales/inventory/';const options = { method: 'PATCH', headers: {'Wink-Version': '2.0', 'Content-Type': 'application/json'}, body: '{"identifier":"","enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.wink.travel/api/managing-entity//extranet/sales/inventory/ \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "identifier": "", "enabled": true }'Toggle inventory availability. Only used to enable / disable inventory.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The property ID to update inventory for
The inventory ID to update
Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”Update inventory request body
object
Unique record identifier
Example
channel-1Flag the supplier can use to enable / disable this blocking
Example
trueResponses
Section titled “ Responses ”OK
object
Document UUID
Datetime this record was first created
Datetime this record was last updated
Version property that shows how many times this document has been persisted. Document will not persist if the version property is less than current version property in the system. Result in an optimistic locking exception.
Parent sales channel
object
Unique record identifier of this segment / account
Channel is owned by this supplier identifier.
Name of property / supplier that owns this channel
Flag when supplier not available. E.g. Hotel disables property
What type of segment of channel is this.
A specific identifier for the company / corporation / travel agency that is retrieving the rates
Name of the owner / affiliate. Hotel booking customization when it’s the booking customization.
Flag the supplier can use to enable / disable this channel
System override by supplier to disable channel. E.g. Platform disables supplier.
A way to blacklist a specific channel a property doesn’t want to send blocking to.
Percent discount on this channel and all its children [unless configured at the child level].
Amount of sales commission earned through this channel and all its children [unless configured at the child level].
Promotions for this channel
object
Unique record identifier
Hotel identifier.
Internal name of promotion.
Set whether you want the price to go up or down when the rules of this promotion have been satisfied.
object
When the type is FIXED, fixedAmount is required. When the type is PERCENTAGE, percent is required.
A percentage of the total stay amount for an early check-in or late check-out
A localized amount
object
Whether this promotion is enabled or not.
This determines whether this discount should be applied per night, per stay or per person - per night
Localized descriptions describing promotion. At least one English entry is required.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Restrict promotion to specific cities. See Geo-IP city geoname data
object
City geoIP
object
GeoNameLightweight identifiers taken from https://geonames.org.
Locale code
Continent code
Continent name
Country ISO code
Country name
City name
Timezone
Sub-division 1 code
Sub-division 1 name
Sub-division 2 code
Sub-division 2 name
Restrict promotion to specific continents. See Geo-IP continent geoname data
object
Continent code
Restrict promotion to specific countries. See Geo-IP country geoname data
object
Country to restrict on
object
Restrict promotion by requiring users to enter a promo code.
object
Promotion code
Restrict promotion to specific IP ranges.
object
Start of IP range
End of IP range
Restrict promotion by restricting to how many rooms the user wants.
object
Minimum number of rooms
Maximum number of rooms
Restrict promotion to either prepaid / non-prepaid rates.
object
Whether prepay is required or not
Restrict promotion to either refundable / non-refundable rates.
object
Whether restriction is on refundable rates
Restrict promotion to specific time zones. See Geo-IP timezone geoname data
object
Bookers timezone
Restrict promotion to users who want to book a room close to the date.
object
Seconds before day of arrival occurs
Restrict promotion to users who want to stay a certain number of days.
object
Minimum length of stay qualifier
Maximum length of stay qualifier
Restrict promotion to users who want to book in advance.
object
Minimum advance booking offset qualifier
Maximum advance booking offset qualifier
Restrict promotion to specific stay dates the user wants to arrive.
object
The effective (start) date of the stay date rate qualifier
The expiration (end) date of the stay date rate qualifier
Restrict promotion to specific dates the booking is made.
object
The effective (start) date of the sell date rate qualifier
The expiration (end) date of the sell date rate qualifier
Restrict promotion to specific days of the week the promotion is available.
object
The days of the week when this rate is available
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest is arriving.
object
The days of the week when this rate is available for guests to arrive on
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest is departing.
object
The days of the week when this rate is available
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest has to stay.
object
The days of the week the user has to stay on to get this rate
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict on specific master rates.
Restrict on specific add-ons.
Restrict on specific rate plans.
Exclude this promotion from specific date ranges.
object
Blackout start date.
Blackout end date.
Promotion bundles for this channel
object
Unique record identifier
Hotel identifier.
Internal name of promotion ancillary.
Whether this promotion ancillary is enabled or not.
Promotions that go together to make up this ancillary.
object
Unique record identifier
Hotel identifier.
Internal name of promotion.
Set whether you want the price to go up or down when the rules of this promotion have been satisfied.
object
When the type is FIXED, fixedAmount is required. When the type is PERCENTAGE, percent is required.
A percentage of the total stay amount for an early check-in or late check-out
A localized amount
object
Whether this promotion is enabled or not.
This determines whether this discount should be applied per night, per stay or per person - per night
Localized descriptions describing promotion. At least one English entry is required.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Restrict promotion to specific cities. See Geo-IP city geoname data
object
City geoIP
object
GeoNameLightweight identifiers taken from https://geonames.org.
Locale code
Continent code
Continent name
Country ISO code
Country name
City name
Timezone
Sub-division 1 code
Sub-division 1 name
Sub-division 2 code
Sub-division 2 name
Restrict promotion to specific continents. See Geo-IP continent geoname data
object
Continent code
Restrict promotion to specific countries. See Geo-IP country geoname data
object
Country to restrict on
object
Restrict promotion by requiring users to enter a promo code.
object
Promotion code
Restrict promotion to specific IP ranges.
object
Start of IP range
End of IP range
Restrict promotion by restricting to how many rooms the user wants.
object
Minimum number of rooms
Maximum number of rooms
Restrict promotion to either prepaid / non-prepaid rates.
object
Whether prepay is required or not
Restrict promotion to either refundable / non-refundable rates.
object
Whether restriction is on refundable rates
Restrict promotion to specific time zones. See Geo-IP timezone geoname data
object
Bookers timezone
Restrict promotion to users who want to book a room close to the date.
object
Seconds before day of arrival occurs
Restrict promotion to users who want to stay a certain number of days.
object
Minimum length of stay qualifier
Maximum length of stay qualifier
Restrict promotion to users who want to book in advance.
object
Minimum advance booking offset qualifier
Maximum advance booking offset qualifier
Restrict promotion to specific stay dates the user wants to arrive.
object
The effective (start) date of the stay date rate qualifier
The expiration (end) date of the stay date rate qualifier
Restrict promotion to specific dates the booking is made.
object
The effective (start) date of the sell date rate qualifier
The expiration (end) date of the sell date rate qualifier
Restrict promotion to specific days of the week the promotion is available.
object
The days of the week when this rate is available
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest is arriving.
object
The days of the week when this rate is available for guests to arrive on
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest is departing.
object
The days of the week when this rate is available
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict promotion to specific days of the week the guest has to stay.
object
The days of the week the user has to stay on to get this rate
object
Set to true to enable Monday.
Set to true to enable Tuesday.
Set to true to enable Wednesday.
Set to true to enable Thursday.
Set to true to enable Friday.
Set to true to enable Saturday.
Set to true to enable Sunday.
Convenience property to quickly determine if this existing object has any active days enabled.
Restrict on specific master rates.
Restrict on specific add-ons.
Restrict on specific rate plans.
Exclude this promotion from specific date ranges.
object
Blackout start date.
Blackout end date.
object
When the type is FIXED, fixedAmount is required. When the type is PERCENTAGE, percent is required.
A percentage of the total stay amount for an early check-in or late check-out
A localized amount
object
Required if manual override modifier is not null
Determines whether this discount should be applied per night, per stay or per person - per night; Required if amount override is not null
Optional bundle-level descriptions. When populated, these replace the aggregated item descriptions in offerDetails.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
object
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Whether the sales channel is a self-acquiring entity.
Inventory type
Inventory type identifier
Name of inventory as hotel is seeing it
Name of inventory as traveler is seeing it
Whether this inventory is enabled or not
Main image of inventory
object
Document identifier
Use this identifier to communicate with Cloudinary.
Whether Cloudinary media is a VIDEO or IMAGE.
Currently ONLY using Cloudinary to store all image / video assets.
Sort allows you to control how you want to sort this record in a list of media records.
Media angle
Media width in pixels.
Media height in pixels.
Instead of deleting the media, choose to un-publish it instead for later re-use. Could be you keep seasonal images of the property.
Supported OTA specification PIC code. See OTA geoname data
Localized media captions to give user some context about where this media was taken.
object
Use as title or short text description
Longer text description
Indicate which language this description is written in.
Whether it was user or system generated.
The md5 hash of the name, description and language.
Associate this media with a specific lifestyle type. A user searching and filtering inventory based on lifestyles can be shown relevant media first.
Whether image has attribution properties
object
URL to contributor
Name of contributor
True if media width is greater or equal to height
Level of expensiveness.
Location
object
Defaults to property address.
object
Address line 1
Address line 2
State
Postal / zip code
County
City name
Country
Country
Address 1, Address 2, City, State, Postal / Zip code, Country
Quantity
Whether this is commissionable or not
Whether inventory can be booked
Which continent the inventory is located on
Which country the inventory is located on
Which country the inventory is located on
Which city the inventory is located on
Which city the inventory is located on
Best price of the room type or facility ancillary
object
Best price of the room type or facility ancillary in platform currency
object
Example
{ "id": "", "createdDate": "", "lastUpdate": "", "version": "", "salesChannel": "", "inventoryType": "GUEST_ROOM", "inventoryIdentifier": "", "inventoryName": "", "inventoryNameInEnglish": "", "enabled": true, "image": null, "pricePoint": "HALF", "location": "", "address": null, "quantity": 0, "commissionable": false, "bookable": true, "continent": "", "countryCode": "", "countryGeoNameId": "", "cityGeoNameId": "", "cityUrlName": "", "lowestPrice": "", "lowestDisplayPrice": ""}Bad Request
object
object
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}object
object
object
object
object
object
object
object
Unauthorized
object
object
Forbidden
object
object
Internal Server Error
object
Example generated
{}