openapi: 3.2.0 info: title: Data Collection Event 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 tags: - name: Data Collection Event 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: DownloadTypeEnum: type: string enum: - AUTO - MANUAL SharedKey: type: object properties: token: type: - string - 'null' example: f477bf19-1321-48b5-97bc-3080b42d74ef DeviceRegistration: type: object properties: regToken: type: string description: Token value example: '89765432' registrationType: type: string description: Registration type example: MCI 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 SourceEnum: type: string enum: - MOBILE - WEB - KIOSK - SPOG - GRE - PMS - OSD 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. 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 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. 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' Application: type: object properties: appName: type: string description: Application name example: Marriott-RL appVersion: type: string description: Application version example: 10.58.0 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 - 'null' description: The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc. example: hotelops-osd-data-collection timestamp: type: string description: The time of which the error occurred. format: datetime example: '2023-06-16T15:49:00.000Z' path: type: - string - 'null' description: The path associated with the generated error. example: /osd/v1/stays/{confirmation-number}/data-collection description: An error occurred 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' DeviceOSEnum: type: string enum: - IOS - ANDROID 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 - 'null' description: The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc. example: hotelops-osd-data-collection timestamp: type: string description: The time of which the error occurred. format: datetime example: '2023-06-16T15:49:00.000Z' path: type: - string - 'null' description: The path associated with the generated error. example: /osd/v1/stays/{confirmation-number}/data-collection description: An error occurred 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. Customer: required: - altCustomerId type: object properties: altCustomerId: type: string description: Customer Id example: 65FC2F415C94DE188996E49A0C4CC6CF6.U1 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. VendorTypeEnum: type: string enum: - KABA - ONITY - VING Vendor: type: object properties: sdkVersion: type: string description: This field will contain Vendor Sdk Version example: 7.4.1.115 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 - 'null' description: The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc. example: hotelops-osd-data-collection timestamp: type: string description: The time of which the error occurred. format: datetime example: '2023-06-16T15:49:00.000Z' path: type: - string - 'null' description: The path associated with the generated error. example: /osd/v1/stays/{confirmation-number}/data-collection description: An error occurred 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." 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 - 'null' description: The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc. example: hotelops-osd-data-collection timestamp: type: string description: The time of which the error occurred. format: datetime example: '2023-06-16T15:49:00.000Z' path: type: - string - 'null' description: The path associated with the generated error. example: /osd/v1/stays/{confirmation-number}/data-collection description: An error occurred 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 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. 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 - 'null' description: The optionally provided source of the error i.e. the Amadeus webservice name, the name of the system/service returning the error, etc. example: hotelops-osd-data-collection timestamp: type: string description: The time of which the error occurred. format: datetime example: '2023-06-16T15:49:00.000Z' path: type: - string - 'null' description: The path associated with the generated error. 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. 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'