Table of Contents

AcuInvoice API

The AcuInvoice API is an interface for accessing your AcuInvoice account data using using HTTP and XML. The API makes it easy to create web, desktop, and mobile applications that integratewith your account.

Service URL

The AcuInvoice API has a single point of entry, made through your account URL:

https://sample.acuinvoice.com/api/

Please note the use of https:// in the URL above. All AcuInvoice API communication is encrypted over HTTPS. Any non-secure requests are automatically rejected. We thus recommend that you establish a test connection with the secure API entry point before sending sensitive data.

Authentication

Your API key is located in My Account | Preferences. When you update your master account password, your API key will automatically change. Keep this key secret. It should be guarded just as you would your regular account password. For every API request you make, you'll need to present this key using basic HTTP authentication. HTTP authentication traditionally takes a username/password pair, but since we're dealing with a single key, you'll only use the username field.

Here's an example authenticated request made with cURL:

 curl -u insert_key_here:X https://sample.acuinvoice.com/api/xml-in  -d '[xml body here]'

Representation Formats

All AcuInvoice API requests are composed of lightweight XML delivered as an HTTP POST request to the endpoint URL.

  1. All XML should be UTF-8 encoded.
  2. Date and time values are of the form YYYY-MM-DD HH:MM:SS.
  3. Booleans are either 1 (true) or 0 (false).

Example Request

<?xml version="1.0" encoding="UTF-8"?>
<request method="[method name]">
  [method arguments]
</request>

All responses are wrapped in a top-level request element. The status attribute will let you know whether the request succeeded or failed.

Successful Response

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  [return value(s) here]
</response>

In the case of a failure response, the response body will contain error message.

Failure Response

<?xml version="1.0" encoding="UTF-8"?>
<response status="fail">
  <error> ... </error>
</response>