Enrichment API
Operations related to Qvalia Enrichments
API accepts a single invoice file (PDF or XML) and processes it asynchronously. Returns a polling ID to check the status of enrichment. Send the pollingId to the enrchment GET endpoint to get the status or completed result.
The Enrichment API is billed separately hence require additional permissions to be enabled. Please contact Qvalia support if you require access.
Account registration number issued by Qvalia
""Optional name of the file being uploaded, including extension (e.g., invoice.pdf).
invoice.pdfThe Base64 encoded content of the file.
UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA==types of enrichment tasks to perform. Ex; "capture"
captureOptional parameters for enrichment processing
File accepted for processing.
Invalid file or request.
Too Many Requests. The account has exceeded its request budget, which is counted per account across all Qvalia APIs.
Read Retry-After and wait at least that many seconds before retrying — retrying
immediately is simply rejected again. RateLimit-Remaining on every response tells
you how much of the budget is left, so a well-behaved client need not hit this at
all. Contact Qvalia Helpdesk if your integration needs
a higher limit.
POST /enrichment/{accountRegNo}/invoice HTTP/1.1
Host: api-test.qvalia.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 119
{
"fileName": "invoice.pdf",
"fileContent": "UEsFBgAAAAAAAAAAAAAAAAAAAAAAAA==",
"enrichmentTypes": "capture",
"parameters": {}
}{
"status": "text",
"data": {
"pollingId": "text"
}
}API accepts a list of products and processes it asynchronously. Returns a polling ID to check the status of enrichment. Send the pollingId to the enrchment GET endpoint to get the status or completed result.
The Enrichment API is billed separately hence require additional permissions to be enabled. Please contact Qvalia support if you require access.
Account registration number issued by Qvalia
""types of enrichment tasks to perform. Ex; "unspsc"
unspscFile accepted for processing.
Invalid file or request.
Too Many Requests. The account has exceeded its request budget, which is counted per account across all Qvalia APIs.
Read Retry-After and wait at least that many seconds before retrying — retrying
immediately is simply rejected again. RateLimit-Remaining on every response tells
you how much of the budget is left, so a well-behaved client need not hit this at
all. Contact Qvalia Helpdesk if your integration needs
a higher limit.
POST /enrichment/{accountRegNo}/categorisation HTTP/1.1
Host: api-test.qvalia.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"products": [
{
"id": 1,
"product_name": "fire alarm"
}
],
"enrichmentTypes": "unspsc"
}{
"status": "text",
"data": {
"pollingId": "text"
}
}This endpoint allows clients to check the status of an enrichment process using a polling ID. Since enrichment is an asynchronous operation, this endpoint should be used to monitor progress and retrieve results once processing is complete.
Response Content: The response data will contain results for the specific enrichment types that were requested in the original POST request. For example:
If "capture" was requested, the response will include a
captureobjectIf "categorisation" was requested, the response will include a
categorisationobjectIf both were requested, both objects will be present in the response
Polling Behavior
If the enrichment process is still ongoing, the API will return HTTP 202 (Accepted), indicating that the request was received and is still being processed.
Once the enrichment is complete, the API will return HTTP 200 (OK) along with the final result.
Clients must limit polling requests to once every 30 seconds. Requests made at a higher frequency may be rate-limited or rejected
Account registration number issued by Qvalia
""The unique polling ID for the file
""Enrichment complete, result available.
Status of the request (e.g., success).
The enrichment process is still in progress. The client should retry after 30 seconds.
The polling ID is malformed.
The polling ID is unknown or has expired.
Too Many Requests. The account has exceeded its request budget, which is counted per account across all Qvalia APIs.
Read Retry-After and wait at least that many seconds before retrying — retrying
immediately is simply rejected again. RateLimit-Remaining on every response tells
you how much of the budget is left, so a well-behaved client need not hit this at
all. Contact Qvalia Helpdesk if your integration needs
a higher limit.
GET /enrichment/{accountRegNo}/{pollingId} HTTP/1.1
Host: api-test.qvalia.com
Authorization: YOUR_API_KEY
Accept: */*
{
"status": "text",
"data": {
"capture": {
"result": {
"Invoice": {}
},
"errors": [
"text"
],
"warnings": [
"text"
]
},
"categorisation": {
"result": {},
"errors": [
"text"
]
}
}
}Get the enrichment result using the polling ID. Returns the result in the format requested.
Account registration number issued by Qvalia
""The unique polling ID for the file
""The enrichment type sent on posting of the document
captureExample: capturePossible values: Enrichment complete, result available.
Status of the request (e.g., success).
The enrichment process is still in progress. The client should retry after 30 seconds.
The polling ID is malformed.
The polling ID is unknown or has expired.
Too Many Requests. The account has exceeded its request budget, which is counted per account across all Qvalia APIs.
Read Retry-After and wait at least that many seconds before retrying — retrying
immediately is simply rejected again. RateLimit-Remaining on every response tells
you how much of the budget is left, so a well-behaved client need not hit this at
all. Contact Qvalia Helpdesk if your integration needs
a higher limit.
GET /enrichment/{accountRegNo}/{pollingId}/{enrichmentType} HTTP/1.1
Host: api-test.qvalia.com
Authorization: YOUR_API_KEY
Accept: */*
{
"status": "text",
"data": {
"result": {},
"errors": [],
"warnings": []
}
}Last updated
Was this helpful?

