VBAPI is a powerful solution designed for clients utilizing VBASoftware. Traditionally, clients have had read-only access to their databases. With VBAPI, organizations can directly interact with their production database, enabling seamless integration with internal and external systems. By leveraging VBAPI, companies can operate more autonomously and reduce reliance on VBA for vendor interfaces or custom solution development.
These endpoints allow retrieval and manipulation of structured data within VBASoftware. Each database table corresponds to multiple API endpoints supporting standard CRUD operations:
- Create – Insert new records.
- List – Retrieve multiple records.
- Get – Fetch a specific record.
- Update – Modify existing data.
- Delete – Remove records.
- Batch Operations – Process multiple records in a single request.
Advanced endpoints go beyond basic CRUD data access. The Advanced APIs contain additional business logic and perform complex tasks. Some examples are:
- Adjudicating a Claim
- Disenrolling a Member
The VBAPI follows the REST architecture, offering predictable resource-oriented URLs, JSON-encoded request bodies, JSON-encoded responses, and standard HTTP methods and response codes. All API requests must be made over HTTPS; plain HTTP requests will be rejected.
Every request must include a User-Agent header. Best practice is to provide your company's use case information within this header to help us optimize API performance and usage analytics.
VBAPI supports three authentication schemes:
- API Keys: All endpoints require an API key in the
x-api-keyheader. Example:x-api-key: (your_api_key) - Basic Authentication: Some endpoints require base64-encoded
username:passwordin theAuthorizationheader. Example:Authorization: Basic (base64_encoded_username:password) - Bearer Authentication: Upon successful login, a JWT token is issued. Include it in the
Authorizationheader for subsequent requests. Example:Authorization: Bearer (id_token)
:::attention Contact your Account Executive to request an API Key. :::
Idempotency ensures that repeated identical requests result in the same outcome, preventing unintended side effects.
- Not idempotent
- Used for creating new resources
- Returns 201 Created on success
const resp = await fetch('https://vbapi-dev.vbasoftware.com/vbasoftware/counties', {
method: 'POST',
headers: {
'Authorization': 'Bearer id-token',
'vbasoftware-database': 'string',
'x-api-key': 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
county_Code: 'string',
county_Name: 'string',
state: 'st'
})
});
const data = await resp.json();
console.log(data);- Idempotent
- Read-only operation with no side effects
- Responses can be cached
- Returns 200 OK on success
const countyCode = 'YOUR_countyCode_PARAMETER';
const resp = await fetch(`https://vbapi-dev.vbasoftware.com/vbasoftware/counties/${countyCode}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer id-token',
'vbasoftware-database': 'string',
'x-api-key': 'YOUR_API_KEY_HERE'
}
});
const data = await resp.text();
console.log(data);- Idempotent
- Used for full updates (all-or-nothing updates)
- Returns 200 OK on success
const countyCode = 'YOUR_countyCode_PARAMETER';
const resp = await fetch(`https://vbapi-dev.vbasoftware.com/vbasoftware/counties/${countyCode}`, {
method: 'PUT',
headers: {
'Authorization': 'Bearer id-token',
'vbasoftware-database': 'string',
'x-api-key': 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
county_Code: 'ONE',
county_Name: 'County UNO',
state: 'SC'
})
});
const data = await resp.json();
console.log(data);- Not supported
- Use
PUTfor updates
- Idempotent
- Used to delete resources
- Returns 204 No Content on success
const countyCode = 'YOUR_countyCode_PARAMETER';
const resp = await fetch(`https://vbapi-dev.vbasoftware.com/vbasoftware/${countyCode}`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer id-token',
'vbasoftware-database': 'string',
'x-api-key': 'YOUR_API_KEY_HERE'
}
});
const data = await resp.text();
console.log(data);- Idempotent for updates, non-idempotent for creates
- Supports bulk create and update operations
- Returns 207 Multi-Status, with individual response codes for each item
const resp = await fetch(`https://vbapi-dev.vbasoftware.com/vbasoftware/counties-batch`, {
method: 'PUT',
headers: {
'Authorization': 'Bearer id-token',
'vbasoftware-database': 'string',
'x-api-key': 'YOUR_API_KEY_HERE'
},
body: JSON.stringify([
{
county_Code: 'ONE',
county_Name: 'County One',
state: 'SC'
},
{
county_Code: 'TWO',
county_Name: 'County Two',
state: 'SC'
}
])
});
const data = await resp.json();
console.log(data);VBAPI adheres to conventional HTTP response codes to indicate the success or failure of an API request.
- 200 OK – The request was successful, and the response contains the requested data.
- 201 Created – The request successfully created a resource.
- 400 Bad Request – The request was malformed or invalid.
- 401 Unauthorized – Authentication is required or failed.
- 403 Forbidden – The authenticated user lacks necessary permissions.
- 404 Not Found – The requested resource does not exist.
- 500 Internal Server Error – A generic server error occurred.
Every response from VBAPI follows a standardized envelope format, ensuring consistency across successful and error responses.
{
"data": single object | array of objects | null on error,
"error": single object | null,
"debug": {
"activityId": "unique request identifier"
}
}Successful responses include a data field, which contains either a single object or an array of objects. The error field remains null, and the debug object contains an activityId.
{
"data": [
{ "id": 1, "name": "Example" }
],
"error": null,
"debug": {
"activityId": "a62d1412-9fe9-4ac0-9dc7-3a3e35d202fd"
}
}If an error occurs, the data field is null, and an error object provides details. The debug object still contains an activityId.
- type – A URL linking to additional information about the error.
- title – A brief, user-friendly summary of the error.
- status – The HTTP status code corresponding to the error.
- detail – A descriptive message explaining the error.
- instance – The specific API endpoint where the error occurred.
{
"data": null,
"error": {
"type": "https://httpstatuses.com/404",
"title": "Not Found",
"status": 404,
"detail": "The requested resource (xyz) was not found.",
"instance": "/clients/abc/products/xyz"
},
"debug": {
"activityId": "a62d1412-9fe9-4ac0-9dc7-3a3e35d202fd"
}
}Each response includes a debug object containing a unique activityId. This identifier links all internal logs related to a specific request. When seeking support, providing the activityId ensures the fastest resolution.
By structuring responses in this format, VBAPI ensures consistency, traceability, and ease of troubleshooting for developers.