{"swagger":"2.0","info":{"title":"BludeltaWebServiceAPI Hosted","version":"1.0"},"host":"validation-dev.bludelta.ai","basePath":"/","schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/upload/resource":{"post":{"tags":["upload"],"summary":"The upload resource call is an optional function to provide additional data for BLU DELTA, e.g. master data about clients and suppliers. The uploaded file will be stored in the BLU DELTA database.","description":"The upload resource call is an optional function to provide additional data for BLU DELTA, e.g. master data about clients and suppliers. The uploaded file will be stored in the BLU DELTA database.","operationId":"UploadResourceRequestresource_Post","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"body","in":"body","schema":{"$ref":"#/definitions/UploadResourceRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/UploadResourceResponse"}}},"deprecated":true},"parameters":[{"$ref":"#/parameters/Accept"}]},"/upload/invoiceContainer":{"post":{"tags":["upload"],"summary":"Upload an invoice container.","description":"Upload an invoice container.","operationId":"UploadInvoiceContainerRequestinvoiceContainer_Post","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"body","in":"body","schema":{"$ref":"#/definitions/UploadInvoiceContainerRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/UploadInvoiceContainerResponse"}}},"deprecated":false},"parameters":[{"$ref":"#/parameters/Accept"}]},"/count/invoices":{"get":{"tags":["count"],"summary":"Count how many invoices are in the specified states for all customers connected to the specified access token.","description":"Count how many invoices are in the specified states for all customers connected to the specified access token.","operationId":"CountInvoicesRequestinvoices_Get","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"State","in":"query","description":"Comma separate list of invoice states.","type":"string","required":true}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/CountInvoicesResponse"}}},"deprecated":false},"parameters":[{"$ref":"#/parameters/Accept"}]},"/v2/download/invoice/next":{"get":{"tags":["v2"],"summary":"Get a single invoice together with the DetectInvoiceResponse. The client should repeat this call until the property Available = false.","description":"Get a single invoice together with the DetectInvoiceResponse. The client should repeat this call until the property Available = false.","operationId":"DownloadNextInvoiceRequestV2downloadinvoicenext_Get","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"IncludeResultPdf","in":"query","description":"Specifies whether the response should contain the result pdf. Default is value is false.","type":"boolean","required":false,"x-nullable":false}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/DownloadNextInvoiceResponseV2"}}},"deprecated":false},"parameters":[{"$ref":"#/parameters/Accept"}]},"/download/invoice/next":{"get":{"tags":["download"],"summary":"Get a single invoice together with the DetectInvoiceResponse. The client should repeat this call until the property Available = false.","description":"Get a single invoice together with the DetectInvoiceResponse. The client should repeat this call until the property Available = false.","operationId":"DownloadNextInvoiceRequestV1invoicenext_Get","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"IncludeResultPdf","in":"query","description":"Specifies whether the response should contain the result pdf. Default is value is false.","type":"boolean","required":false,"x-nullable":false}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/DownloadNextInvoiceResponseV1"}}},"deprecated":true},"parameters":[{"$ref":"#/parameters/Accept"}]},"/download/email":{"get":{"tags":["download"],"summary":"Downloads the source pdf for an invoice as PDF file.","description":"Downloads the source pdf for an invoice as PDF file.","operationId":"DownloadEmailRequestemail_Get","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/DownloadEmailResponse"}}},"deprecated":false},"parameters":[{"$ref":"#/parameters/Accept"}]},"/confirm/invoice":{"post":{"tags":["confirm"],"summary":"The confirm invoice call confirms the reception of an invoice document. The Server marks the invoice as transferred and removes it from the list of validatable/downloadable invoices. If an invoice is not confirmed by the ERP System, it will be moved to the end of the downloadable invoices-list and then provided again.","description":"The confirm invoice call confirms the reception of an invoice document. The Server marks the invoice as transferred and removes it from the list of validatable/downloadable invoices. If an invoice is not confirmed by the ERP System, it will be moved to the end of the downloadable invoices-list and then provided again.","operationId":"ConfirmInvoiceRequestinvoice_Post","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"body","in":"body","schema":{"$ref":"#/definitions/ConfirmInvoiceRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/ConfirmInvoiceResponse"}}},"deprecated":false},"parameters":[{"$ref":"#/parameters/Accept"}]},"/invoiceContainer/state":{"get":{"tags":["invoiceContainer"],"summary":"Get a state history for the specified invoice containers.","description":"Get a state history for the specified invoice containers.","operationId":"InvoiceContainerStateRequeststate_Get","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ContainerIds","in":"query","description":"Comma separated list of invoice container ids.","type":"string","required":true}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/InvoiceContainerStateResponse"}}},"deprecated":false},"parameters":[{"$ref":"#/parameters/Accept"}]},"/create/accesstoken":{"post":{"tags":["create"],"summary":"The access token is used in all following API calls as authentication token.","description":"The access token is used in all following API calls as authentication token.","operationId":"AccessTokenRequestaccesstoken_Post","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"body","in":"body","schema":{"$ref":"#/definitions/AccessTokenRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/AccessTokenResponse"}}},"deprecated":false},"parameters":[{"$ref":"#/parameters/Accept"}]}},"definitions":{"Object":{"properties":{},"description":"Object","type":"object"},"UploadResourceRequest":{"title":"UploadResourceRequest","required":["Type","FileName","File"],"properties":{"Name":{"description":"Optional name parameter.","type":"string"},"Description":{"description":"Optional description parameter.","type":"string"},"Type":{"description":"The resource type. Possible options are: 'ClientMasterData' and 'SupplierMasterData'.","type":"string"},"Separator":{"description":"The separator used in the resource file. Default value is tab.","type":"string"},"FileName":{"description":"The file name of the uploaded resource file.","type":"string"},"File":{"description":"The contents of the resource file as base64 encoded string.","type":"string"}},"description":"The upload resource call is an optional function to provide additional data for BLU DELTA, e.g. master data about clients and suppliers. The uploaded file will be stored in the BLU DELTA database.","type":"object"},"UploadInvoiceContainerRequest":{"title":"UploadInvoiceContainerRequest","required":["File"],"properties":{"Name":{"description":"The name of the invoice container.","type":"string"},"Description":{"description":"A description of the invoice container that is saved alongside with it.","type":"string"},"File":{"description":"Base64 encoded file data.","type":"string"},"FileName":{"description":"File name of the file contained in the container.","type":"string"},"ClientAccessIdentifier":{"description":"Last part of the api identifier of a client (split by '.').","type":"string"},"UploadSource":{"description":"The upload source of the invoice container - possible values are EmailInvoiceListener = 1, ValidationWebsite = 2.","type":"integer","format":"int32"},"AdditionalProperties":{"$ref":"#/definitions/Dictionary_String_String_","description":"A dictionary of type string, string containing additional properties that are saved alongside the invoice container.","type":"object"}},"description":"Upload an invoice container.","type":"object"},"Dictionary_String_String_":{"title":"Dictionary<String,String>","additionalProperties":{"type":"string"},"description":"Dictionary<String,String>","type":"object"},"CountInvoicesRequest":{"title":"CountInvoicesRequest","required":["State"],"properties":{"State":{"description":"Comma separate list of invoice states.","type":"string"}},"description":"Count how many invoices are in the specified states for all customers connected to the specified access token.","type":"object"},"DownloadNextInvoiceRequestV2":{"title":"DownloadNextInvoiceRequestV2","properties":{"IncludeResultPdf":{"description":"Specifies whether the response should contain the result pdf. Default is value is false.","type":"boolean","x-nullable":false}},"description":"Get a single invoice together with the DetectInvoiceResponse. The client should repeat this call until the property Available = false.","type":"object"},"DownloadNextInvoiceRequestV1":{"title":"DownloadNextInvoiceRequestV1","properties":{"IncludeResultPdf":{"description":"Specifies whether the response should contain the result pdf. Default is value is false.","type":"boolean","x-nullable":false}},"description":"Get a single invoice together with the DetectInvoiceResponse. The client should repeat this call until the property Available = false.","type":"object"},"DownloadEmailRequest":{"title":"DownloadEmailRequest","required":["InvoiceId"],"properties":{"InvoiceId":{"description":"Id of the invoice","type":"string","format":"uuid","x-nullable":false}},"description":"Downloads the source pdf for an invoice as PDF file.","type":"object"},"ConfirmInvoiceRequest":{"title":"ConfirmInvoiceRequest","required":["InvoiceId"],"properties":{"InvoiceId":{"description":"Id of the invoice","type":"string","format":"uuid","x-nullable":false}},"description":"The confirm invoice call confirms the reception of an invoice document. The Server marks the invoice as transferred and removes it from the list of validatable/downloadable invoices. If an invoice is not confirmed by the ERP System, it will be moved to the end of the downloadable invoices-list and then provided again.","type":"object"},"InvoiceContainerStateRequest":{"title":"InvoiceContainerStateRequest","required":["ContainerIds"],"properties":{"ContainerIds":{"description":"Comma separated list of invoice container ids.","type":"string"}},"description":"Get a state history for the specified invoice containers.","type":"object"},"AccessTokenRequest":{"title":"AccessTokenRequest","properties":{"Name":{"description":"The name of the user.","type":"string"},"Description":{"description":"Optional description.","type":"string"},"TimeoutSeconds":{"description":"Expiration timeout. Will be reset with every request.","type":"integer","format":"int32","x-nullable":false},"ApiIdentifiers":{"description":"A list of ApiIdentifiers for which the token should be generated.","type":"array","items":{"type":"string"}}},"description":"The access token is used in all following API calls as authentication token.","type":"object"},"UploadResourceResponse":{"title":"UploadResourceResponse","properties":{"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"UploadResourceResponse","type":"object"},"UploadInvoiceContainerResponse":{"title":"UploadInvoiceContainerResponse","properties":{"InvoiceContainerId":{"description":"Id of the container.","type":"string","format":"uuid","x-nullable":false},"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"UploadInvoiceContainerResponse","type":"object"},"CountInvoicesResponse":{"title":"CountInvoicesResponse","required":["Count"],"properties":{"Count":{"description":"An integer representing the number of invoices.","type":"integer","format":"int32","x-nullable":false},"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"CountInvoicesResponse","type":"object"},"DownloadNextInvoiceResponseV2":{"title":"DownloadNextInvoiceResponseV2","required":["Available"],"properties":{"DetectInvoiceResponse":{"$ref":"#/definitions/DetectInvoiceResponse","description":"The latest detect invoice response associated with the invoice.","type":"object"},"Available":{"description":"Is next invoice available.","type":"boolean","x-nullable":false},"InvoiceId":{"description":"Id of the invoice.","type":"string","format":"uuid","x-nullable":false},"InvoiceContainerId":{"description":"Id of the invoice container.","type":"string","format":"uuid","x-nullable":false},"FileName":{"description":"The file name of the originally uploaded file associated with the invoice.","type":"string"},"File":{"description":"The byte array of the originally uploaded file as base64 encoded string.","type":"string"},"ResultPdf":{"description":"The byte array of the result pdf as base64 encoded string - if requested.","type":"string"},"ClientAccessIdentifier":{"description":"If the invoice belonged to a mandator the identifier of this mandator (meaning the part after the '.' in the api identifier).","type":"string"},"AdditionalProperties":{"$ref":"#/definitions/Dictionary_String_String_","description":"A dictionary of type string,string containing all additional properties that were saved for the invoice container associated with the invoice."},"StateBeforeRelease":{"description":"The state of the invoice before it was released. E.g. 'Error', 'Validated', 'Autoprocessed'","type":"string"},"UploadedTimestamp":{"description":"The timestamp of when the invoice was uploaded.","type":"string","format":"date-time","x-nullable":false},"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"DownloadNextInvoiceResponseV2","type":"object"},"DetectInvoiceResponse":{"title":"DetectInvoiceResponse","properties":{"DocumentResolution":{"type":"integer","format":"int32"},"DocumentFormat":{"type":"string"},"Language":{"type":"string"},"Countries":{"type":"string"},"InvoiceDetailTypePredictions":{"type":"array","items":{"$ref":"#/definitions/DetectionResponse"}},"PredictionGroups":{"type":"array","items":{"$ref":"#/definitions/DetectionGroupResponse"}},"LineItemTable":{"$ref":"#/definitions/LineItemTableResponse"},"Sender":{"$ref":"#/definitions/ContactResponse"},"Receiver":{"$ref":"#/definitions/ContactResponse"},"Contacts":{"type":"array","items":{"$ref":"#/definitions/ContactResponse"}},"FormattedResult":{"type":"string"},"IsQualityOk":{"type":"boolean"},"OcrWordQuality":{"type":"number","format":"float"},"MeanCharacterConfidenceValue":{"type":"number","format":"float"},"StdDevCharacterConfidenceValue":{"type":"number","format":"float"},"MaxCharacterConfidenceValue":{"type":"integer","format":"int32"},"OcrResult":{"type":"string"},"OcrPageImages":{"type":"array","items":{"type":"string"}},"ResultPdf":{"type":"string"},"DocumentText":{"type":"string"},"InvoiceState":{"type":"integer","format":"int64"},"Confidence":{"type":"number","format":"float"}},"description":"DetectInvoiceResponse","type":"object"},"DetectionResponse":{"title":"DetectionResponse","properties":{"Type":{"type":"integer","format":"int64"},"TypeName":{"type":"string"},"Text":{"type":"string"},"Value":{"type":"string"},"Score":{"type":"number","format":"double","x-nullable":false},"RecommendedThreshold":{"type":"number","format":"double","x-nullable":false},"X":{"type":"integer","format":"int32","x-nullable":false},"Y":{"type":"integer","format":"int32","x-nullable":false},"Width":{"type":"integer","format":"int32","x-nullable":false},"Height":{"type":"integer","format":"int32","x-nullable":false},"Confidence":{"type":"number","format":"float"}},"description":"DetectionResponse","type":"object"},"DetectionGroupResponse":{"title":"DetectionGroupResponse","properties":{"Type":{"type":"integer","format":"int64"},"TypeName":{"type":"string"},"InvoiceDetailTypePredictions":{"type":"array","items":{"$ref":"#/definitions/DetectionResponse"}}},"description":"DetectionGroupResponse","type":"object"},"LineItemTableResponse":{"title":"LineItemTableResponse","properties":{"LineItems":{"type":"array","items":{"$ref":"#/definitions/LineItemResponse"}}},"description":"LineItemTableResponse","type":"object"},"LineItemResponse":{"title":"LineItemResponse","properties":{"ItemId":{"$ref":"#/definitions/DetailResponse"},"PositionNumber":{"type":"integer","format":"int32"},"Description":{"$ref":"#/definitions/DetailResponse"},"Quantity":{"$ref":"#/definitions/DetailResponse"},"UnitPrice":{"$ref":"#/definitions/DetailResponse"},"TotalAmount":{"$ref":"#/definitions/DetailResponse"},"OrderId":{"$ref":"#/definitions/DetailResponse"},"DeliveryId":{"$ref":"#/definitions/DetailResponse"},"Unit":{"$ref":"#/definitions/DetailResponse"},"VatRate":{"$ref":"#/definitions/DetailResponse"},"DeliveryDate":{"$ref":"#/definitions/DetailResponse"},"Discount":{"$ref":"#/definitions/DetailResponse"},"PositionId":{"$ref":"#/definitions/DetailResponse"},"Score":{"type":"number","format":"double"},"RecommendedThreshold":{"type":"number","format":"double","x-nullable":false},"X":{"type":"integer","format":"int32"},"Y":{"type":"integer","format":"int32"},"Width":{"type":"integer","format":"int32"},"Height":{"type":"integer","format":"int32"}},"description":"LineItemResponse","type":"object"},"DetailResponse":{"title":"DetailResponse","properties":{"Name":{"type":"string"},"Text":{"type":"string"},"Value":{"type":"string"},"Score":{"type":"number","format":"double"},"RecommendedThreshold":{"type":"number","format":"double","x-nullable":false},"X":{"type":"integer","format":"int32"},"Y":{"type":"integer","format":"int32"},"Width":{"type":"integer","format":"int32"},"Height":{"type":"integer","format":"int32"}},"description":"DetailResponse","type":"object"},"ContactResponse":{"title":"ContactResponse","properties":{"Name":{"$ref":"#/definitions/DetailResponse"},"Address":{"$ref":"#/definitions/AddressResponse"},"Score":{"type":"number","format":"double"},"RecommendedThreshold":{"type":"number","format":"double","x-nullable":false},"WebsiteUrl":{"type":"array","items":{"$ref":"#/definitions/DetailResponse"}},"Email":{"type":"array","items":{"$ref":"#/definitions/DetailResponse"}},"Phone":{"$ref":"#/definitions/DetailResponse"},"Fax":{"$ref":"#/definitions/DetailResponse"}},"description":"ContactResponse","type":"object"},"AddressResponse":{"title":"AddressResponse","properties":{"Street":{"$ref":"#/definitions/DetailResponse"},"ZipCode":{"$ref":"#/definitions/DetailResponse"},"City":{"$ref":"#/definitions/DetailResponse"},"Country":{"$ref":"#/definitions/DetailResponse"},"X":{"type":"integer","format":"int32"},"Y":{"type":"integer","format":"int32"},"Width":{"type":"integer","format":"int32"},"Height":{"type":"integer","format":"int32"}},"description":"AddressResponse","type":"object"},"DownloadNextInvoiceResponseV1":{"title":"DownloadNextInvoiceResponseV1","required":["Available"],"properties":{"DetectInvoiceResponse":{"$ref":"#/definitions/DetectInvoiceResponse","description":"The latest detect invoice response associated with the invoice.","type":"object"},"Available":{"description":"Is next invoice available.","type":"boolean","x-nullable":false},"InvoiceId":{"description":"Id of the invoice.","type":"string","format":"uuid","x-nullable":false},"InvoiceContainerId":{"description":"Id of the invoice container.","type":"string","format":"uuid","x-nullable":false},"FileName":{"description":"The file name of the originally uploaded file associated with the invoice.","type":"string"},"File":{"description":"The byte array of the originally uploaded file as base64 encoded string.","type":"string"},"ResultPdf":{"description":"The byte array of the result pdf as base64 encoded string - if requested.","type":"string"},"ClientAccessIdentifier":{"description":"If the invoice belonged to a mandator the identifier of this mandator (meaning the part after the '.' in the api identifier).","type":"string"},"AdditionalProperties":{"$ref":"#/definitions/Dictionary_String_String_","description":"A dictionary of type string,string containing all additional properties that were saved for the invoice container associated with the invoice."},"StateBeforeRelease":{"description":"The state of the invoice before it was released. E.g. 'Error', 'Validated', 'Autoprocessed'","type":"string"},"UploadedTimestamp":{"description":"The timestamp of when the invoice was uploaded.","type":"string","format":"date-time","x-nullable":false},"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"DownloadNextInvoiceResponseV1","type":"object"},"DownloadEmailResponse":{"title":"DownloadEmailResponse","required":["FileBytes","FileName"],"properties":{"FileBytes":{"description":"The byte array of the zip file containing the PDF document.","type":"byte[]","format":"binary","x-nullable":false},"FileName":{"description":"The suggested filename for the downloaded zip file.","type":"string"},"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"DownloadEmailResponse","type":"object"},"ConfirmInvoiceResponse":{"title":"ConfirmInvoiceResponse","properties":{"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"ConfirmInvoiceResponse","type":"object"},"InvoiceContainerStateResponse":{"title":"InvoiceContainerStateResponse","properties":{"InvoiceContainerStates":{"description":"An array containing the state reports for all invoice containers.","type":"array","items":{"$ref":"#/definitions/DocumentContainerStateReport"}},"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"InvoiceContainerStateResponse","type":"object"},"DocumentContainerStateReport":{"title":"DocumentContainerStateReport","properties":{"DocumentContainerId":{"description":"The id of the invoice container.","type":"string","format":"uuid","x-nullable":false},"DocumentContainerStates":{"description":"An array containing the state objects of the container.","type":"array","items":{"$ref":"#/definitions/DocumentContainerState"}},"DocumentStateReports":{"description":"An array containing the state reports for all invoices of the container.","type":"array","items":{"$ref":"#/definitions/DocumentStateReport"}}},"description":"DocumentContainerStateReport","type":"object"},"DocumentContainerState":{"title":"DocumentContainerState","properties":{"State":{"description":"The state of the invoice container as string - e.g. 'New', 'Error', etc.","type":"string"},"Timestamp":{"description":"The timestamp of when the container was set to the corresponding state.","type":"string","format":"date-time","x-nullable":false}},"description":"DocumentContainerState","type":"object"},"DocumentStateReport":{"title":"DocumentStateReport","properties":{"DocumentId":{"description":"The id of the invoice.","type":"string","format":"uuid","x-nullable":false},"DocumentStates":{"description":"An array containing the state objects of the invoice.","type":"array","items":{"$ref":"#/definitions/DocumentState"}}},"description":"DocumentStateReport","type":"object"},"DocumentState":{"title":"DocumentState","properties":{"State":{"description":"The state of the invoice as string - e.g. 'NeedForAction', 'Error', etc.","type":"string"},"Timestamp":{"description":"The timestamp of when the invoice was set to the corresponding state.","type":"string","format":"date-time","x-nullable":false}},"description":"DocumentState","type":"object"},"AccessTokenResponse":{"title":"AccessTokenResponse","properties":{"AccessToken":{"description":"The generated access token. Must be provided as header field 'X-AccessToken'.","type":"string"},"State":{"description":"0 = Ok, 1 = Failed","type":"integer","format":"int32","x-nullable":false},"Message":{"description":"Error message in case of an error","type":"string"}},"description":"AccessTokenResponse","type":"object"}},"parameters":{"Accept":{"name":"Accept","in":"header","description":"Accept Header","type":"string","required":true,"enum":["application/json"]}},"securityDefinitions":{"Bearer":{"type":"apiKey","name":"Authorization","in":"header"}},"tags":[{"name":"confirm"},{"name":"count"},{"name":"create"},{"name":"download"},{"name":"invoiceContainer"},{"name":"upload"},{"name":"v2"}]}