Method |
Request URI |
HTTP Version |
GET |
OLD URL (will be deprecated soon): {OLD EBH domain}/validations/api/{api version}/ValidationRequest/{id} NEW URL (recommended): {NEW EBH domain}/ebh/validations/{api version}/ValidationRequest/{id} Api versions: v1, v2. |
HTTP/1.1 |
URI Parameters
The following table describes required and optional URI parameters.
Parameter |
Description |
Id |
Required. A created validation request identifier returned in the response from Validation API POST request. |
Request Headers
The following table describes required and optional request headers.
Request header |
Description |
ProducerId |
Required. Specifies the client on behalf of which the request is sent. |
ProviderKey |
Required. Specifies the access token. |
Username |
Optional. Specifies the user on behalf of which the request is sent. The value is used for reporting purposes only and defined by the caller. |
Accept |
Optional. Specifies the expected response format. A list of valid values: application/json (default), */*. |
The response includes an HTTP status code, a set of response headers and a response body, which contains the results of the processed validation request.
Status Codes
A successful operation returns status code 202 (Accepted) in case validation is in progress, else status code 200 (OK) in case validation was completed.
Status code |
Description |
200 OK |
The request was successful. See the response body for details. |
202 ACCEPTED |
The results are not yet ready. Try again later. |
400 BAD REQUEST |
The request was incorrectly formatted, missing a required header or parameters were invalid. |
401 UNAUTHORIZED |
The Provider Key is not authorized. |
406 NOT ACCEPTABLE |
Provided Accept HTTP Header is not supported. |
500 INTERNAL SERVER ERROR |
Something went wrong. |
Response Headers
Response header |
Description |
Location |
The location header indicates the URL to the created resource. |
OperationId |
The unique identifier associated with the request. |
Response Body
A request was successfully processed:
The validation request is in progress (status code 202 Accepted), no validation results returned:
{
"Id": "56ec4bb5-d0f1-4bd5-8bc1-4d28d6269459",
"Status": 1,
"InvoiceType": 3,
"ValidationMessage": null,
"PostTime": "2019-06-04T11:17:09.97Z",
"StartTime": null,
"EndTime": null,
"ValidationResults": []
}
The validation request was completed (status code 200 OK), validation results returned.
{
"Id": "03a43f3c-a809-4132-9ad3-73087486cd09",
"Status": 4,
"InvoiceType": 3,
"PostTime": "2016-07-07T23:32:55Z",
"StartTime": "2016-07-07T23:32:57Z",
"EndTime": "2016-07-07T23:32:58Z",
"ValidationMessage": "Validation Complete",
"ValidatedInvoiceUrl": "https:///{eBHdomain}/api/v1/ValidationRequest/03a43f3c-a809-4132-9ad3-73087486cd09",
"ValidationResults": [
{
"Severity": "UBF_MESSAGE",
"Identifier": "UBFDocument/consumers/item[@consumerId='1710']/invoices/item[@invoiceId='12744407']/currency",
"Message": "The currency must follow ISO Codes",
"RulePath": "UbfValidation_Ledes_standard.Invoice.invoice_UBF.Validate_currency.Validate_currency"
}
]
}
An error occurred while processing a request:
{
"Message": "An unexpected error occurred. Please, contact the support team."
}