swagger: "2.0" info: description: "OTA integration for Channel Managers" version: "1" title: "Orbital Platforms OTA API" contact: email: "robertboloc@silverdoorapartments.com" name: "Robert Boloc" basePath: "/v1" schemes: - "https" paths: /external/ota/mappings: get: summary: "Apartment types with rate plans mapping for one property" produces: - "application/json" parameters: - name: "propertyId" in: "query" description: "ID of the property to get the mappings for" type: "string" required: true responses: 200: description: "OK" schema: $ref: "#/definitions/Mappings" 400: description: "Bad Request" 403: description: "Forbidden" /external/ota/inventory: post: summary: "Update availability, rates and restrictions" consumes: - "application/json" produces: - "application/json" parameters: - in: "body" name: "body" description: "ARI data" required: true schema: $ref: "#/definitions/Inventory" responses: 200: description: "OK" schema: type: "object" properties: success: type: "boolean" 400: description: "Bad Request" 401: description: "Access Denied" 403: description: "Forbidden" definitions: Mappings: type: "array" items: type: "object" properties: apartment: type: "object" properties: type: type: "string" enum: [ "studioApartment", "1BedroomApartment", "2BedroomApartment", "3BedroomApartment", "4BedroomApartment", "otherApartment", "otherApartment2", "otherApartment3", "otherApartment4", "otherApartment5" ] label: type: "string" example: "My Custom Apartment Type Label" ratePlans: type: "array" items: type: "object" properties: id: type: "string" example: "1234" label: type: "string" example: "My Custom Rate Plan Label" Inventory: type: "object" properties: propertyId: description: "ID of the property to update" example: "12345" type: "string" availability: description: "List of availability updates to apply" type: "array" items: type: "object" properties: dates: description: "Date range the update is applicable to" type: "object" properties: from: description: "Start date of the update" example: "2017-07-07" type: "string" format: "date" to: description: "End date of the update (inclusive)" example: "2017-07-10" type: "string" format: "date" required: ["from", "to"] apartmentType: description: "Type of the apartment to update" type: "string" enum: [ "studioApartment", "1BedroomApartment", "2BedroomApartment", "3BedroomApartment", "4BedroomApartment", "otherApartment", "otherApartment2", "otherApartment3", "otherApartment4", "otherApartment5" ] ratePlanId: description: "ID of the rate plan to update" example: "56789" type: "string" quantity: description: "Amount of apartments available to book" type: "integer" example: 3 isAvailable: description: "Is the apartment available to book?" type: "boolean" required: ["dates", "apartmentType", "ratePlanId", "quantity", "isAvailable"] rates: description: "List of rates updates to apply" type: "array" items: type: "object" properties: dates: description: "Date range the update is applicable to" type: "object" properties: from: description: "Start date of the update" example: "2017-07-07" type: "string" format: "date" to: description: "End date of the update (inclusive)" example: "2017-07-10" type: "string" format: "date" required: ["from", "to"] apartmentType: description: "Type of the apartment to update" type: "string" enum: [ "studioApartment", "1BedroomApartment", "2BedroomApartment", "3BedroomApartment", "4BedroomApartment", "otherApartment", "otherApartment2", "otherApartment3", "otherApartment4", "otherApartment5" ] ratePlanId: description: "ID of the rate plan to update" example: "56789" type: "string" rate: description: "Rate for the specified date range in minor units" type: "integer" example: 15000 required: ["dates", "apartmentType", "ratePlanId", "rate"] restrictions: description: "List of restriction updates to apply" type: "array" items: type: "object" properties: dates: description: "Date range the update is applicable to" type: "object" properties: from: description: "Start date of the update" example: "2017-07-07" type: "string" format: "date" to: description: "End date of the update (inclusive)" example: "2017-07-10" type: "string" format: "date" required: ["from", "to"] apartmentType: description: "Type of the apartment to update" type: "string" enum: [ "studioApartment", "1BedroomApartment", "2BedroomApartment", "3BedroomApartment", "4BedroomApartment", "otherApartment", "otherApartment2", "otherApartment3", "otherApartment4", "otherApartment5" ] ratePlanId: description: "ID of the rate plan to update" example: "56789" type: "string" minimumStay: description: "Minimum nights stay required" type: "integer" example: 2 isCheckInAllowed: description: "Is check-in allowed" type: "boolean" isCheckOutAllowed: description: "Is check-out allowed" type: "boolean" required: ["dates", "apartmentType", "ratePlanId", "minimumStay", "isCheckInAllowed", "isCheckOutAllowed"] required: ["propertyId"]