Qvalia Developer Tools

Our APIs and onboarding team ensures a swift integration into your systems and processes. Qvalia integrates with major ERPs and accounting software.

All Qvalia API’s are REST based and we use both JSON and XML request and response payloads. All message formats are based upon UBL and our JSON format is a representation of the XML called UBL JSON by OASIS Open group. We strive to use the REST standards for response codes and “verbs” (e.g. GET and POST).

The Qvalia API has two separate endpoints for our Production and a Test (Quality Assurance) environment.

https://api.qvalia.com/ [Production]

https://api-qa.qvalia.com/ [Staging / Sandbox]


Want to jump right in?

Quick StartAPI's

Authentication

We use API keys for the Authentication of requests. You can get your API key from our Support team and you’ll get a separate key and URL for Production and Test environments. All requests are using HTTPS with a minimum of TLS 1.2

Parameters

Some of our API's has the possibility to provide parameters for e.g. filtering. These parameters are sent as a query string and the options are listed per endpoint under the technical API documentation.

Error handling

We offer various error codes based upon the type of error, along with a descriptive error message (in JSON or XML). Like any other API codes in the range of 2xx is a successful request while a status of 4xx indicates an error that occurred because of the data sent or a parameter missing/in error. In the 5xx range indicate an error with our server/service and you should contact the Qvalia Support if you ever would end up getting any 5xx code as response.

Support

You can always contact Qvalia Support through your Qvalia Sales representative or by using our Support e-mail (see your Qvalia Account for details).

Coding

We use Node.js inhouse, and JSON is our format of choice, however, as many ERP and Financial systems are using XML we have opted to add support for both formats in our API. You can freely swap between XML and JSON, just by using different headers:

Omitting accept or content-type headers, we'll default to JSON!

XML

JSON (Default)

GET requests:

accept: application/xml

POST requests:

content-type: application/xml

GET requests:

accept: application/json

POST requests:

content-type: application/json

Node.js sample code for calling the API for sending a JSON request could look like:

async function httpsPost(registrationNumber, data) {
  return new Promise(async (resolve, reject) => {
    const options = {
      hostname: 'api.qvalia.com',
      path: `/transaction/${registrationNumber}/invoices/outgoing`,
      port: 443,
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        Authorization: '412ee738......d3e469a7'
      }
    };
    const body = [];
    const req = https.request(options, res => {
      res.on('data', d=> {
        body.push(d);
      });
      res.on('end', () => {
        resolve(body);
      });
    });
    req.on('error', e => {
      reject(e);
    });
    req.write(JSON.stringify(data));
    req.end();
  });
}

Last updated

Was this helpful?