Getting started with Data Access APIs
Get Started
Data access APIs are based on REST API. They provide a mechanism to extract raw data from Basware AP Automation. The APIs are used to get a list of the extracts that are available for download. There can be one or multiple extracts available for download. Each extract is a collection of multiple data sets in ZIP files.
Prerequisites
For new customers, subscription to the service will include both dashboards and Data Access. For existing customers, Data Access is available as an add-on service exclusively for those using Insights Essentials or Pro dashboards. Mixing and matching dashboards and Data Access across different tiers is not supported.
To access the data access APIs, data access needs to be provisioned for your tenant. You will receive API credentials specific to the data access APIs. These will be provided to you by your Basware delivery project consultant or your technical partner manager.
Try it out
This is an example how to get data extracts. To interact with the API you can use any tool capable of getting HTTP messages, such as Postman or curl. This example uses Postman.
- GET to URL: https://api.basware.com/v1/dataExtracts
- You will receive a list of available data extracts. Example:
[
{
"id": "{extract_id}",
"type": "Initial",
"startDate": "31/01/1970, 21:00:00",
"endDate": "28/03/2024, 10:17:02",
"fileCount": 5,
"downloadStatus": "new",
"extractDate": "28/03/2024, 10:21:14",
"extractName": "Premium_data_extract"
}
]
- Use "id" from above and use GET to URL: https://api.basware.com/v1/dataExtracts/{extract_id}
- You will receive the following response:
[
{
"extractId"
:
"{extract_id}"
,
"tableName"
:
"ADM_SUPPLIER"
,
"fileName"
:
"ADM_SUPPLIER_0001.json.gz"
,
"downloadUrl"
:
"https://api.basware.com/v1/dataExtracts/{extract_id}/getFile?file=ADM_SUPPLIER_0001.json.gz"
},
{
"extractId"
:
"{extract_id}"
,
"tableName"
:
"IA_CODING_ROW"
,
"fileName"
:
"IA_CODING_ROW_0001.json.gz"
,
"downloadUrl"
:
"https://api.basware.com/v1/dataExtracts/{extract_id}/getFile?file=IA_CODING_ROW_0001.json.gz"
},
{
"extractId"
:
"{extract_id}"
,
"tableName"
:
"IA_INVOICE"
,
"fileName"
:
"IA_INVOICE_0001.json.gz"
,
"downloadUrl"
:
"https://api.basware.com/v1/dataExtracts/{extract_id}/getFile?file=IA_INVOICE_0001.json.gz"
},
{
"extractId"
:
"{extract_id}"
,
"tableName"
:
"IA_INVOICE_ORDER_NUMBER"
,
"fileName"
:
"IA_INVOICE_ORDER_NUMBER_0001.json.gz"
,
"downloadUrl"
:
"https://api.basware.com/v1/dataExtracts/{extract_id}/getFile?file=IA_INVOICE_ORDER_NUMBER_0001.json.gz"
},
{
"extractId"
:
"{extract_id}"
,
"tableName"
:
"PE_PROCESS_TASK"
,
"fileName"
:
"PE_PROCESS_TASK_0001.json.gz"
,
"downloadUrl"
:
"https://api.basware.com/v1/dataExtracts/{extract_id}/getFile?file=PE_PROCESS_TASK_0001.json.gz"
}
]
- Then you can use downloadUrl, GET to https://api.basware.com/v1/dataExtracts/{extract_id}/getFile?file=ADM_SUPPLIER_0001.json.gz, and use "send" and "download" in Postman to download the file. The file will be downloaded to your system.
- To get the schema of the data extract, use GET to https://api.basware.com/v1/dataExtracts/specification/tableDefinition, and use "send" and "download" in Postman to download the file.
"{tablename1}": [
{
"Column name": "ID1",
"Data Type": "NVARCHAR2",
"Field definition": "Unique identifier of row",
"Included": true,
"Example value": null,
"version": "20240215-100929"
},
{
"Column name": "NAME1",
"Data Type": "NVARCHAR2",
"Field definition": "Company name.",
"Included": true,
"Example value": "Acme corporation",
"version": "20240215-100929"
}
]
"{tablename2}": [
{
"Column name": "ID2",
"Data Type": "NVARCHAR2",
"Field definition": "Unique identifier of row",
"Included": true,
"Example value": null,
"version": "20240215-100929"
},
{
"Column name": "NAME2",
"Data Type": "NVARCHAR2",
"Field definition": "Company name.",
"Included": true,
"Example value": "Acme corporation",
"version": "20240215-100929"
}
]
Which API do I need?
Check out our API selection guide fo a list of APIs required in the most common business scenarios.