{"swagger":"2.0","info":{"version":"1.7.0","title":"1A_REST_JSON_Offer_Plan","description":"Offer Plans API is a set of RESTful JSON operations that allow \nthe creation and manipulation of Offer Plan object on Rates side. An offer plan can be a game tier plan, promotion or any other promotion object.\n","termsOfService":"https://developers.amadeus.com","contact":{"name":"Amadeus Hospitality Systems Integration Support"},"x-tags":["Internal"],"x-release-note":{"1.0":["Initial Version"],"1.1":["Endpoints added to support CRUD at Corporate level","Extended Offer Plan model for sub-type Promotion and Upsell rule with Booking Period, Stay Period, PromoGroupCode, PropertyCode, InventoryTypeCode, Segmentation","Support pagination"],"1.2":["Extend search parameters for corporate and property level","Support versioning"],"1.3":["Added lookForwardDays"],"1.4":["Added Synchronize operation"],"1.5":["######## New Endpoints ##########################","POST v1/rates/chains/{chainCode}/offer-plans/search - search operations with parameter in body","POST v1/rates/chains/{chainCode}/properties/{propertyCode}/offer-plans/search - search operations with parameter in body","############## New Fields in the Request ##########","data.qualifiers.inventoryTypes[]","############ New Error #################","HTTP 429"],"1.6":["####### New Fields in Request and Response #######","data.subType-Create-Property, Update-Property, Retrieve-Property, synchronize-property","data.qualifiers.promoCodes[]-Create-Property, Update-Property, Retrieve-Property, synchronize-property","####### New Fields in Request #######","data.subType-Search-Property","data.qualifiers.promoCodes[]-Search-Property"],"1.7":["####### New Fields in Response #######","warnings[]- Search-Property"]}},"schemes":["https"],"tags":[{"name":"Corporate Level - Offer Plan"},{"name":"Hotel Level - Offer Plan"}],"basePath":"/v1","consumes":["application/json"],"produces":["application/json"],"paths":{"/feeds/rates/chains/{chainCode}/properties/{propertyCode}/offer-plans/{planId}":{"parameters":[{"$ref":"#/parameters/chainCode","x-path":"/paths[\"/feeds/rates/chains/{chainCode}/properties/{propertyCode}/offer-plans/{planId}\"]/parameters[0]"},{"$ref":"#/parameters/propertyCode","x-path":"/paths[\"/feeds/rates/chains/{chainCode}/properties/{propertyCode}/offer-plans/{planId}\"]/parameters[1]"},{"$ref":"#/parameters/planId","x-path":"/paths[\"/feeds/rates/chains/{chainCode}/properties/{propertyCode}/offer-plans/{planId}\"]/parameters[2]"}],"post":{"tags":["Hotel Level - Offer Plan"],"summary":"synchronize-property","description":"This operation automatically pushes the property level Offer Plan to the external system, when triggers are met.","operationId":"synchronizeProperty","parameters":[{"$ref":"#/parameters/synchronizedOfferPlan"},{"$ref":"#/parameters/ama-request-id"},{"$ref":"#/parameters/ama-request-correlation-id"},{"$ref":"#/parameters/ama-correlation-id"},{"$ref":"#/parameters/ama-retry-count"},{"$ref":"#/parameters/ama-sequence-id"},{"$ref":"#/parameters/ama-destinations-whitelist"},{"$ref":"#/parameters/ama-destinations-blacklist"},{"$ref":"#/parameters/ama-transmission-time"}],"responses":{"200":{"$ref":"#/responses/returnFeedSuccess"},"400":{"$ref":"#/responses/400"},"503":{"$ref":"#/responses/503"},"default":{"$ref":"#/responses/500"}}}}},"parameters":{"ama-request-id":{"name":"Ama-Request-Id","in":"header","required":false,"type":"string","description":"Request Id of the message.Unique transaction identifier"},"ama-request-correlation-id":{"name":"Ama-Request-Correlation-Id","in":"header","required":false,"type":"string","description":"Correlation request id grouping several transactions that are related"},"ama-correlation-id":{"name":"Ama-Correlation-Id","in":"header","required":false,"type":"string","description":"Correlation request id grouping several transactions that are related"},"ama-retry-count":{"name":"Ama-Retry-Count","in":"header","required":false,"type":"string","description":"Retry count of the message."},"ama-sequence-id":{"name":"Ama-Sequence-Id","in":"header","required":false,"type":"string","format":"int32","description":"Sequence of the message depending on the scope. Refer implementation details"},"ama-destinations-whitelist":{"name":"Ama-Destinations-Whitelist","in":"header","required":false,"type":"array","items":{"type":"string"},"description":"Targeted systems for the message"},"ama-destinations-blacklist":{"name":"Ama-Destinations-Blacklist","in":"header","required":false,"type":"array","items":{"type":"string"},"description":"Targeted systems for the message except the ones in this list"},"ama-transmission-time":{"name":"Ama-Transmission-Time","in":"header","required":false,"type":"string","format":"date-time","description":"Time when the header is attached to the message"},"chainCode":{"name":"chainCode","in":"path","required":true,"description":"chain/corporate code","type":"string","pattern":"[A-Z0-9]{2,3}","minLength":2,"maxLength":3},"propertyCode":{"name":"propertyCode","in":"path","description":"property/hotel code","required":true,"type":"string","pattern":"[A-Z0-9]{1,8}","minLength":1,"maxLength":8},"planId":{"name":"planId","in":"path","description":"Offer Plan Id","required":true,"type":"string"},"synchronizedOfferPlan":{"name":"synchronizedOfferPlan","in":"body","description":"Actual content to synchronize","required":true,"schema":{"title":"synchronizedOfferPlan","required":["data"],"properties":{"meta":{"$ref":"#/definitions/FeedsMeta"},"data":{"$ref":"#/definitions/PropertyOfferPlan"}}}}},"definitions":{"PropertyOfferPlan":{"title":"Corporate Offer Plan","type":"object","description":"Corporate Offer Plan Data Model","properties":{"id":{"type":"string","description":"Unique Identifier of the Offer Plan object"},"type":{"type":"string","description":"Type of the tier plan such as GameTierPlan, Promotions, SellStrategy","enum":["GameTierPlan","Promotion","UpsellRule"]},"subType":{"type":"string","description":"Type of GameTierPlan","enum":["PerpetualOffer","OneOffOffer"]},"isActive":{"type":"boolean","description":"Indicator determines the status of the Offer Plan object"},"qualifiers":{"type":"object","description":"Contains the list of attributes a qualifier for the offer plan object","title":"Qualifiers","properties":{"valueTiers":{"type":"array","description":"Determines the rank assigned based on their value configuration. Example,a rewards member whose value tier is configured for GameTierPlan object","items":{"type":"string"},"example":["1","2","3"]},"playDominance":{"type":"array","description":"Determines the rank assigned to a rewards member based on their gaming history for which the Qualification is configured for","items":{"type":"string"},"example":["Poker","Slots","Table","Tickets"]},"pseudoProperty":{"type":"string","description":"Determines the pseudo property code for the physical property of the Offer Plan","example":"HTL01"},"inventoryTypeCode":{"description":"Contains the inventory Type code for which the offer plan object can be offered such as an UpsellRule","type":"string","maxLength":50},"inventoryTypes":{"description":"Contains the list of inventory Type codes for which the offer plan object can be offered such as an UpsellRule","type":"array","maxLength":50,"items":{"type":"string"}},"bookingPeriod":{"description":"Contains the start and end date for booking period in Date time format","$ref":"#/definitions/Period"},"stayPeriod":{"description":"Contains the start and end date for stay period in Date format","$ref":"#/definitions/Period"},"promoCodes":{"description":"Contains list of Promo Codes associated to the OneOffOffer","type":"array","maxLength":300,"items":{"type":"string"},"example":["SUMMER1","THANKSGIVING"]}}},"overrides":{"type":"object","title":"Overrides","description":"Contains the list of rate plan attributes that can be overridden","properties":{"name":{"type":"string","description":"Contains the attribute value that overrides the name of the Rate plan(s)","example":"RPXYZ"},"description":{"type":"string","description":"Contains the attribute value that overrides the description of the Rate plan(s)","example":"Holiday Offer Promotional Rate"},"promoCode":{"type":"string","description":"Determines the promo code that can be overriden with over the one of the rate plan's promo code","example":"XMAS20","maxLength":50}}},"segmentation":{"title":"Segmentation","description":"Contains the segment (such as geographical regions, brands, properties) to which the Offer Plan object applies","$ref":"#/definitions/Segmentation"},"promoGroupCode":{"type":"string","description":"Contains the promotion group code associated to the Offer Plan object","maxLength":50},"code":{"type":"string","description":"Contains the unique user generated code for the Offer Plan object such as for a Promotion","maxLength":50},"ratePlans":{"type":"array","description":"Contains the rate plans associated to each bucket","items":{"type":"object","description":"Rate Plan code and Bucket type to which the rate plan code belongs","title":"RatePlan","properties":{"type":{"type":"string","description":"Determines the type of bucket to which the Rate Plan code belongs - Comp, Cash, Loyalty","enum":["Comp","Cash","Loyalty"]},"code":{"type":"string","description":"Rate Plan code","example":"RP01"}}}},"bookingLimits":{"type":"object","title":"BookingLimits","description":"Contains the list of attributes for applicable booking quotas for applicable buckets and booking windows","properties":{"compNightsPerWeek":{"type":"integer","description":"Determines the value of Complimentary Nights offered per week","example":1},"cashNightsPerWeek":{"type":"integer","description":"Determines the value of Cash Nights offered per week","example":2},"preferredNightsPerWeek":{"type":"integer","description":"Determines the value of Preferred Nights offered per week","example":3},"compRatesPerStay":{"type":"integer","description":"Determines the value of Complimentary Rates offered per stay","example":4},"cashRatesPerStay":{"type":"integer","description":"Determines the value of Cash Rates offered per stay","example":5},"compNightsPerBookingWindow":{"type":"integer","description":"Determines the value of Complimentary Nights offered per Booking Window","example":6},"cashNightsPerBookingWindow":{"type":"integer","description":"Determines the value of Cash Nights offered per Booking Window","example":7},"compNightsPerStay":{"type":"integer","description":"Determines the value of Complimentary Nights offered per stay","example":9},"cashNightsPerStay":{"type":"integer","description":"Determines the value of Cash Nights offered per stay","example":10},"preferredRatesDailyLimit":{"type":"integer","description":"Determines the preferred Rates Daily Limit","example":4},"minDaysBetweenBookings":{"type":"integer","description":"Determines the minimum days required between bookings","example":11},"lookBackDays":{"type":"integer","description":"Determines the look back days as a representation of booking window","example":12},"lookForwardDays":{"type":"integer","description":"Determines the look forward days","example":3}}}},"example":{"type":"Promotion","id":"678912","isActive":true,"code":"1NFREE","promoGroupCode":"SUMMER21","qualifiers":{"bookingPeriod":{"start":"2020-08-12T08:00:00","end":"2020-08-20T08:00:00"},"stayPeriod":{"start":"2020-08-12","end":"2020-08-30"}},"overrides":{"name":"Summer Offers for 2021","description":"Promotional Offers for summer season, 1N Free for loyalty Guests"},"ratePlans":[{"code":"RP01"},{"code":"RP02"},{"code":"RP03"},{"code":"RP04"},{"code":"RP05"}]}},"Error_400":{"properties":{"errors":{"type":"array","items":{"$ref":"#/definitions/Issue"}}},"required":["errors"],"example":{"errors":[{"status":400,"code":110010,"title":"Missing Mandatory Data","source":{"parameter":"startDate","example":"2018-09-22"}}]}},"Error_500":{"properties":{"errors":{"type":"array","items":{"$ref":"#/definitions/Issue"}}},"required":["errors"],"example":{"errors":[{"status":500,"code":110000,"title":"An internal error occurred"}]}},"Error_503":{"properties":{"errors":{"type":"array","items":{"$ref":"#/definitions/Issue"}}},"required":["errors"],"example":{"errors":[{"status":503,"code":110008,"title":"Service Unavailable"}]}},"Issue":{"type":"object","title":"Issue","properties":{"status":{"description":"The HTTP status code applicable to this error","type":"integer","example":400},"code":{"description":"An application-specific error code","type":"integer","example":14453},"title":{"description":"A short summary of the error","type":"string"},"detail":{"description":"Explanation of the error","type":"string"},"source":{"type":"object","title":"IssueSource","description":"An object containing references to the source of the error","properties":{"pointer":{"description":"A JSON Pointer [RFC6901] to the associated entity in the request document","type":"string"},"parameter":{"description":"A string indicating which URI query parameter caused the issue","type":"string"},"example":{"type":"string","description":"A sample input to guide the user when resolving this issue"}}}}},"FeedsMeta":{"properties":{"chainCode":{"description":"chain/corporate code","type":"string","pattern":"[A-Z0-9]{2,3}","minLength":2,"maxLength":3},"propertyCode":{"description":"property/hotel code","type":"string","pattern":"[A-Z0-9]{1,8}"},"generationTime":{"description":"date-time Zulu time up to the second at which the data has been gathered. Format is ISO8601.","example":"2019-12-21T23:59:50Z","type":"string"},"action":{"description":"action","type":"string","example":"Create","enum":["Create","Refresh","Update","Delete"]}}},"Period":{"title":"Period","type":"object","minProperties":1,"properties":{"start":{"description":"start date-time follows ISO 8601 format","type":"string","example":"2019-12-20T23:59:59"},"end":{"description":"end date-time follows ISO 8601 format","type":"string","example":"2019-12-21T23:59:59"}}},"Segmentation":{"title":"VisibilityRule","type":"object","minProperties":1,"properties":{"brands":{"type":"array","description":"list of codes of selected brands or '*' for the selection of all brands","items":{"description":"unique identifier of a Brand in a Chain","type":"string","pattern":"[A-Z0-9]{2,3}|[*]","example":"BRD"}},"regions":{"type":"array","description":"list of codes of selected regions or '*' for the selection of all regions","items":{"description":"The code of the region","type":"string","pattern":"[A-Za-z0-9]{1,3}|[*]","minLength":1,"maxLength":3,"example":"01"}},"properties":{"type":"array","description":"list of codes of included properties","items":{"description":"unique identifier of a Property in a Chain or a Brand","type":"string","minLength":1,"maxLength":8,"pattern":"[A-Z0-9]{1,8}","example":"PTY01"}}}}},"responses":{"400":{"description":"Bad Request\n\nExamples of functional error codes (not exhaustive list):\n\ncode    | title                                 \n------- | ------------------- \n20310   | Invalid parameter\n110010  | Missing Mandatory Data\n","schema":{"$ref":"#/definitions/Error_400"}},"500":{"description":"Unexpected Error\n\ncode    | title\n------- | ------------------- \n110000  | An internal error occurred\n","schema":{"$ref":"#/definitions/Error_500"}},"503":{"description":"Forbidden\n\ncode    | title\n------- | ------------------- \n110008  | Service Unavailable\n","schema":{"$ref":"#/definitions/Error_503"}},"returnFeedSuccess":{"description":"Successful Operation","schema":{"title":"Success","required":["data"],"properties":{"data":{"type":"array","items":{"title":"Warning","properties":{"warning":{"type":"array","items":{"$ref":"#/definitions/Issue"}}}}}}}}},"x-metadata":{"status":0}}