{"openapi":"3.0.3","info":{"title":"Data Collection API","description":"This is an API to capture and publish additional data for events to be consumed by PACD","version":"1.0.0"},"servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/marriott-api/Data_Collection_API/1.0.0"},{"url":"https://virtserver.swaggerhub.com/marriott-api/Digital_Key_Events_Data_Collection/1.0.0","description":"SwaggerHub API Auto Mocking"},{"url":"https://gatewaydsapdev1.marriott.com/","description":"Marriott API gateway host endpoint - Dev environment"},{"url":"https://gatewaydsaptst1.marriott.com/","description":"Marriott API gateway host endpoint - Test environment"}],"paths":{"/osd/v1/stays/{confirmation-number}/data-collection":{"post":{"tags":["Data Collection Event"],"description":"Data Collection Event","operationId":"DataCollectionEvent","parameters":[{"name":"correlation-id","in":"header","description":"Correlation ID for debugging and tracking","required":true,"style":"simple","explode":false,"schema":{"type":"string"}},{"name":"confirmation-number","in":"path","description":"Reservation confirmation number","required":true,"schema":{"type":"string","example":"89765432"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataCollectionRequest"}}},"required":true},"responses":{"202":{"description":"Accepted"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseBadRequest"}}}},"404":{"description":"Request Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseRequestNotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseUnprocessableEntity"}}}},"500":{"description":"Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseInternalServerError"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseServiceUnavailable"}}}}}}}},"components":{"schemas":{"DataCollectionRequest":{"required":["guestStay","lockVendor","transactionType"],"type":"object","properties":{"transactionType":{"type":"string","description":"Transaction type for which event is triggering this endpoint","example":"DIGITAL_KEY_USED"},"issuedDt":{"description":"Key issue date time (DateTime type)","format":"datetime","example":"2023-10-01T10:00:00Z"},"expirationDt":{"description":"Key expiration date time (DateTime type)","format":"datetime","example":"2023-10-02T10:00:00Z"},"lockVendor":{"$ref":"#/components/schemas/VendorTypeEnum"},"downloadType":{"$ref":"#/components/schemas/DownloadTypeEnum"},"device":{"$ref":"#/components/schemas/Device"},"guestStay":{"$ref":"#/components/schemas/GuestStay"},"transaction":{"$ref":"#/components/schemas/Transaction"},"lock":{"$ref":"#/components/schemas/Lock"},"vendor":{"$ref":"#/components/schemas/Vendor"},"deviceRegistration":{"$ref":"#/components/schemas/DeviceRegistration"},"sharedKey":{"$ref":"#/components/schemas/SharedKey"}},"description":"This entity represents meta data of a digital key."},"VendorTypeEnum":{"type":"string","enum":["KABA","ONITY","VING"]},"DownloadTypeEnum":{"type":"string","enum":["AUTO","MANUAL"]},"Device":{"required":["guestDeviceId"],"type":"object","properties":{"guestDeviceId":{"type":"string","description":"Device id which use to request for digital key like mobile","example":"26885a84-095a-41a3-bd83-4165b3730e48"},"details":{"$ref":"#/components/schemas/DeviceDetail"},"app":{"$ref":"#/components/schemas/Application"}}},"DeviceDetail":{"type":"object","properties":{"deviceType":{"type":"string","description":"Device type","example":"iPhone"},"deviceOs":{"$ref":"#/components/schemas/DeviceOSEnum"},"deviceOsVersion":{"type":"string","description":"Device Os version","example":"16.4"}}},"DeviceOSEnum":{"type":"string","enum":["IOS","ANDROID"]},"Application":{"type":"object","properties":{"appName":{"type":"string","description":"Application name","example":"Marriott-RL"},"appVersion":{"type":"string","description":"Application version","example":"10.58.0"}}},"Lock":{"type":"object","properties":{"lockId":{"type":"string","description":"This field will contain lockId","example":"6A2AC004-8482-3571-B0A9-56DA4D3D8858"},"lockType":{"type":"string","description":"This field will contain lock type","example":"lockType"},"firmwareVersion":{"type":"string","description":"This field will contain lock Firmware Version value","example":"11.16"},"additionalInformation":{"type":"string","description":"Room/Additional access Information","example":"102"},"battery":{"$ref":"#/components/schemas/Battery"},"system":{"type":"string","description":"Access Control System / Lock System","example":"Saflok"},"lcuFirmwareVersion":{"type":"string","description":"Lock Control Unit firmware version","example":"3.17.41.6"},"rfu":{"type":"string","description":"This field will contain rfu details","example":"rfu"},"statusFlags":{"type":"string","description":"This field will contain statusFlags","example":"statusFlags"},"accessAttemptInformation":{"type":"string","description":"This field will contain accessAttemptInformation","example":"accessAttemptInformation"}}},"Transaction":{"type":"object","properties":{"status":{"type":"string","description":"Mobile key transaction Status","example":"ScanTimeout"},"dateTime":{"type":"string","description":"Transaction Date Time (DateTime type)","format":"date-time","example":"2023-10-25T13:13:48Z"},"duration":{"type":"integer","description":"Mobile key transaction Duration","format":"int32","example":100},"code":{"type":"string","description":"Mobile key transaction status Codes","example":"Code: 300 Vendor Code: null"},"message":{"type":"string","description":"Mobile key transaction Status Messages","example":"The unlocking request has timed out Vendor: null Framework: null"},"frameworkStatus":{"type":"string","description":"OpeningStatus or CredentialProcessingStatus","example":"SUCCESS"},"reason":{"type":"string","description":"High level reason door did/did not unlock","example":"Key has expired"}},"description":"Transaction Information"},"Battery":{"type":"object","properties":{"voltage":{"type":"string","description":"This field will contain battery Voltage value","example":"4364 mV Battery"},"status":{"type":"string","description":"This field will contain battery Status value","example":"Good"}}},"Vendor":{"type":"object","properties":{"sdkVersion":{"type":"string","description":"This field will contain Vendor Sdk Version","example":"7.4.1.115"}}},"GuestStay":{"required":["reservation"],"type":"object","properties":{"reservation":{"$ref":"#/components/schemas/Reservation"},"customer":{"$ref":"#/components/schemas/Customer"},"source":{"$ref":"#/components/schemas/SourceEnum"}},"description":"This represents stay details and stay eligibilities.\nFor example, Expected arrival time, parking option selected by guest, currency option selected, digital check-in eligibility status, \nMobile Key eligibility, Skip the Desk eligibility, late check-out eligibility and late check-out eligibility window allowed for this stay etc."},"Reservation":{"required":["arrivalDate","confirmationNumber","propertyCode"],"type":"object","properties":{"confirmationNumber":{"type":"string","description":"Central Reservation ID","example":"89765432"},"propertyCode":{"type":"string","description":"Property code","example":"NYCOX"},"arrivalDate":{"type":"string","description":"Date when guest is arriving","format":"date"},"departureDate":{"type":"string","description":"Date when guest is checking out","format":"date","example":"2023-08-02"}}},"Customer":{"required":["altCustomerId"],"type":"object","properties":{"altCustomerId":{"type":"string","description":"Customer Id","example":"65FC2F415C94DE188996E49A0C4CC6CF6.U1"}}},"DeviceRegistration":{"type":"object","properties":{"regToken":{"type":"string","description":"Token value","example":"89765432"},"registrationType":{"type":"string","description":"Registration type","example":"MCI"}}},"SharedKey":{"type":"object","properties":{"token":{"type":"string","nullable":true,"example":"f477bf19-1321-48b5-97bc-3080b42d74ef"}}},"SourceEnum":{"type":"string","enum":["MOBILE","WEB","KIOSK","SPOG","GRE","PMS","OSD"]},"ErrorResponseBadRequest":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorBadRequest"}}},"description":"The encompassing array of error(s) that can be returned when an issue occurs while requesting a Resource via API."},"ErrorBadRequest":{"required":["code","message","timestamp"],"type":"object","properties":{"code":{"type":"string","description":"The error code of this particular error that can be used to uniquely identify what went wrong with the request.","example":"OSD-DCS-3900"},"message":{"type":"string","description":"The message associated with the error code that was returned that provides more details describing the actual error.","example":"Confirmation Number Missing"},"source":{"type":"string","description":"The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc.","nullable":true,"example":"hotelops-osd-data-collection"},"timestamp":{"type":"string","description":"The time of which the error occurred.","format":"datetime","nullable":false,"example":"2023-06-16T15:49:00.000Z"},"path":{"type":"string","description":"The path associated with the generated error.","nullable":true,"example":"/osd/v1/stays/{confirmation-number}/data-collection"}},"description":"An error occurred"},"ErrorResponseInternalServerError":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorInternalServerError"}}},"description":"The encompassing array of error(s) that can be returned when an issue occurs while requesting a Resource via API."},"ErrorInternalServerError":{"required":["code","message","timestamp"],"type":"object","properties":{"code":{"type":"string","description":"The error code of this particular error that can be used to uniquely identify what went wrong with the request.","example":"OSD-DCS-3952"},"message":{"type":"string","description":"The message associated with the error code that was returned that provides more details describing the actual error.","example":"Internal Server Error"},"source":{"type":"string","description":"The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc.","nullable":true,"example":"hotelops-osd-data-collection"},"timestamp":{"type":"string","description":"The time of which the error occurred.","format":"datetime","nullable":false,"example":"2023-06-16T15:49:00.000Z"},"path":{"type":"string","description":"The path associated with the generated error.","nullable":true,"example":"/osd/v1/stays/{confirmation-number}/data-collection"}},"description":"An error occurred"},"ErrorResponseRequestNotFound":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorRequestNotFound"}}},"description":"The encompassing array of error(s) that can be returned when an issue occurs while requesting a Resource via API."},"ErrorRequestNotFound":{"required":["code","message","timestamp"],"type":"object","properties":{"code":{"type":"string","description":"The error code of this particular error that can be used to uniquely identify what went wrong with the request.","example":"OSD-DCS-3950"},"message":{"type":"string","description":"The message associated with the error code that was returned that provides more details describing the actual error.","example":"Data Not Found"},"source":{"type":"string","description":"The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc.","nullable":true,"example":"hotelops-osd-data-collection"},"timestamp":{"type":"string","description":"The time of which the error occurred.","format":"datetime","nullable":false,"example":"2023-06-16T15:49:00.000Z"},"path":{"type":"string","description":"The path associated with the generated error.","nullable":true,"example":"/osd/v1/stays/{confirmation-number}/data-collection"}},"description":"An error occurred"},"ErrorResponseUnprocessableEntity":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorUnprocessableEntity"}}},"description":"The encompassing array of error(s) that can be returned when an issue occurs while requesting a Resource via API."},"ErrorUnprocessableEntity":{"required":["code","message","timestamp"],"type":"object","properties":{"code":{"type":"string","description":"The error code of this particular error that can be used to uniquely identify what went wrong with the request.","example":"OSD-DCS-3951"},"message":{"type":"string","description":"The message associated with the error code that was returned that provides more details describing the actual error.","example":"Error processing request"},"source":{"type":"string","description":"The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc.","nullable":true,"example":"hotelops-osd-data-collection"},"timestamp":{"type":"string","description":"The time of which the error occurred.","format":"datetime","nullable":false,"example":"2023-06-16T15:49:00.000Z"},"path":{"type":"string","description":"The path associated with the generated error.","nullable":true,"example":"/osd/v1/stays/{confirmation-number}/data-collection"}},"description":"An error occurred"},"ErrorResponseServiceUnavailable":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorServiceUnavailable"}}},"description":"The encompassing array of error(s) that can be returned when an issue occurs while requesting a Resource via API."},"ErrorServiceUnavailable":{"required":["code","message","timestamp"],"type":"object","properties":{"code":{"type":"string","description":"The error code of this particular error that can be used to uniquely identify what went wrong with the request.","example":"OSD-DCS-3953"},"message":{"type":"string","description":"The message associated with the error code that was returned that provides more details describing the actual error.","example":"Service Unavailable"},"source":{"type":"string","description":"The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc.","nullable":true,"example":"hotelops-osd-data-collection"},"timestamp":{"type":"string","description":"The time of which the error occurred.","format":"datetime","nullable":false,"example":"2023-06-16T15:49:00.000Z"},"path":{"type":"string","description":"The path associated with the generated error.","nullable":true,"example":"/osd/v1/stays/{confirmation-number}/data-collection"}},"description":"An error occurred"}}}}