{"openapi":"3.0.1","info":{"title":"Payer Ingestion API","description":"Payer Ingestion API documentation","termsOfService":"","contact":{"name":"","url":"","email":""},"license":{"name":"unlicensed","url":""},"version":"1.0.5"},"servers":[{"url":"/"}],"security":[{"bearer-key":[]}],"tags":[{"name":"Web Hook","description":"Web hook endpoint for azure blob storage"},{"name":"Payer Ingestion","description":"Endpoints for payer ingestion data"}],"paths":{"/api/payer-ingestions/blob-created":{"post":{"tags":["Web Hook"],"summary":"Webhook endpoint for blob created event, to test this manually, set aeg-event-type header to 'Notification' and eventType to 'Microsoft.Storage.BlobCreated'.","description":"Webhook endpoint called by azure blob storage blob created event, that is whenever a file is being added to azure blob storage this endpoint is called.","operationId":"handleBlobStorageEvent","parameters":[{"name":"aeg-event-type","in":"header","required":true,"schema":{"type":"array","items":{"type":"string"}}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BlobStorageEvent"}}}},"required":true},"responses":{"200":{"description":"Blob created event process successfully.","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Not supported blob events.","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/payer-files":{"post":{"tags":["Payer Ingestion"],"summary":"Endpoint to upload file to azure blob storage.","description":"Endpoint to upload file to the given azure blob storage container.","operationId":"uploadFile","parameters":[{"name":"siteId","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"ingestionType","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"404":{"description":"Bad request.","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"File uploaded successfully.","content":{"*/*":{"schema":{"type":"object"}}}}}},"delete":{"tags":["Payer Ingestion"],"summary":"Endpoint to delete old file in azure blob storage, note that this does not change file status in the database.","description":"Endpoint to delete old file in azure blob storage, note that this does not change file status in the database.","operationId":"deletePayerIngestionFiles","parameters":[{"name":"startDate","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"404":{"description":"Bad request","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"file events published successfully.","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/payer-files/publish-row-events":{"post":{"tags":["Payer Ingestion"],"summary":"Endpoint to upload file to azure blob storage.","description":"Endpoint to upload file to the given azure blob storage container.","operationId":"publishRowEvents","parameters":[{"name":"fileUrl","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Bad request, row events might have already been published","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"row events published successfully.","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/payer-files/publish-file-events":{"post":{"tags":["Payer Ingestion"],"summary":"Endpoint to publish file events by file filter.","description":"Endpoint to publish file events by file filter.","operationId":"processPayerIngestionFiles","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerFileFilter"}}},"required":true},"responses":{"404":{"description":"Bad request","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"file events published successfully.","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/payer-files/info/search":{"post":{"tags":["Payer Ingestion"],"summary":"endpoint to search for payer file infos.","description":"endpoint to search for payer file infos.","operationId":"searchPayerFileInfo","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayerFileFilter"}}},"required":true},"responses":{"200":{"description":"Search completed successfully.","content":{"*/*":{"schema":{"type":"object"}}}},"404":{"description":"Bad request.","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/payer-files/{id}/info":{"get":{"tags":["Payer Ingestion"],"summary":"Get endpoint to retrieve payer file info.","description":"Endpoint to upload file to the given azure blob storage container.","operationId":"getPayerFileInfo","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"404":{"description":"Bad request.","content":{"*/*":{"schema":{"type":"object"}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"object"}}}},"200":{"description":"File uploaded successfully.","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/api/payer-files/info/query":{"get":{"tags":["Payer Ingestion"],"summary":"endpoint to query for payer file infos.","description":"endpoint to query for payer file infos.","operationId":"getAllPayerFileInfo","parameters":[{"name":"id.equals","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"id.notEquals","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"id.specified","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"id.in","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"id.notIn","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"siteId.equals","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"siteId.notEquals","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"siteId.specified","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"siteId.in","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"siteId.notIn","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},{"name":"fileName.contains","in":"query","required":false,"schema":{"type":"string"}},{"name":"fileName.doesNotContain","in":"query","required":false,"schema":{"type":"string"}},{"name":"fileName.equals","in":"query","required":false,"schema":{"type":"string"}},{"name":"fileName.notEquals","in":"query","required":false,"schema":{"type":"string"}},{"name":"fileName.specified","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"fileName.in","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"fileName.notIn","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"status.equals","in":"query","required":false,"schema":{"type":"string","enum":["uploaded","uploadFailed","fileEventPublished","fileEventPublishFailed","rowEventPublished","rowEventPublishFailed"]}},{"name":"status.notEquals","in":"query","required":false,"schema":{"type":"string","enum":["uploaded","uploadFailed","fileEventPublished","fileEventPublishFailed","rowEventPublished","rowEventPublishFailed"]}},{"name":"status.specified","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"status.in","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["uploaded","uploadFailed","fileEventPublished","fileEventPublishFailed","rowEventPublished","rowEventPublishFailed"]}}},{"name":"status.notIn","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["uploaded","uploadFailed","fileEventPublished","fileEventPublishFailed","rowEventPublished","rowEventPublishFailed"]}}},{"name":"ingestionType.contains","in":"query","required":false,"schema":{"type":"string"}},{"name":"ingestionType.doesNotContain","in":"query","required":false,"schema":{"type":"string"}},{"name":"ingestionType.equals","in":"query","required":false,"schema":{"type":"string"}},{"name":"ingestionType.notEquals","in":"query","required":false,"schema":{"type":"string"}},{"name":"ingestionType.specified","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"ingestionType.in","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"ingestionType.notIn","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"uploadedAt.greaterThan","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"uploadedAt.lessThan","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"uploadedAt.greaterThanOrEqual","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"uploadedAt.lessThanOrEqual","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"uploadedAt.equals","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"uploadedAt.notEquals","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"uploadedAt.specified","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"uploadedAt.in","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"date-time"}}},{"name":"uploadedAt.notIn","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","format":"date-time"}}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"minimum":0,"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"minimum":1,"type":"integer","default":20}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"Search completed successfully.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayerFileInfoDto"}}}}},"404":{"description":"Bad request.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayerFileInfoDto"}}}}},"500":{"description":"Internal server error.","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayerFileInfoDto"}}}}}}}}},"components":{"schemas":{"BlobStorageEvent":{"required":["blobCreatedEvent"],"type":"object","properties":{"eventType":{"type":"string"},"data":{"$ref":"#/components/schemas/EventData"},"validationCode":{"type":"string"},"blobCreatedEvent":{"type":"boolean"},"fileUrl":{"type":"string"}}},"EventData":{"type":"object","properties":{"validationCode":{"type":"string"},"url":{"type":"string"}}},"PayerFileFilter":{"type":"object","properties":{"statuses":{"type":"array","items":{"type":"string","enum":["uploaded","uploadFailed","fileEventPublished","fileEventPublishFailed","rowEventPublished","rowEventPublishFailed"]}},"siteId":{"type":"string","format":"uuid"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"fetchSize":{"type":"integer","format":"int32"}}},"PayerFileInfoDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"siteId":{"type":"string","format":"uuid"},"fileName":{"type":"string"},"containerName":{"type":"string"},"status":{"type":"string","enum":["uploaded","uploadFailed","fileEventPublished","fileEventPublishFailed","rowEventPublished","rowEventPublishFailed"]},"ingestionType":{"type":"string"},"uploadDate":{"type":"string","format":"date-time"},"rowEventPublishedDate":{"type":"string","format":"date-time"},"blobUrl":{"type":"string"},"notes":{"type":"string"}},"description":"Data transfer object for a spirometry session."}},"securitySchemes":{"bearer-key":{"type":"http","name":"bearer-key","scheme":"bearer","bearerFormat":"JWT"}}}}