API

Application Programming Interface

InvoiceXpress Documentation



Create


accounts.create

Creates a new account.

Usage

You call this method by submitting an HTTP POST request to the following URL with the xml data of the new account on the request body:

https://www.app.invoicexpress.com/api/accounts/create.xml
Header

Content-Type: application/xml; charset=utf-8

Body

XML example to be submitted with account data (simplified version):

<account>
  <organization_name>Company name</organization_name>
  <email>someone@example.com</email>
  <password>123456</password>
  <terms>1</terms>
</account>

XML example to be submitted with account data (complete version):

<account>
  <first_name>Ricardo</first_name>
  <last_name>Pereira</last_name>
  <organization_name>Company name</organization_name>
  <phone>213456789</phone>
  <email>someone@example.com</email>
  <password>123456</password>
  <fiscal_id>504123456</fiscal_id>
  <tax_country>1</tax_country>
  <language>pt</language>
  <terms>1</terms>
</account>

Parameters

Parameter Required Default value Description
first_name No Empty The user’s first name.
last_name No Empty The user’s last name.
organization_name Yes n/a The name of the company.
phone No Empty The account phone number.
email Yes n/a The account email.
password Yes n/a The account password.
fiscal_id No Empty The company fiscal ID (vat number). The fiscal_id, if present, must be unique in the system.
tax_country No 1 The account country. Options: 1 (Portugal); 2 (Ireland); 3 (UK). See the Appendix for more countries.
language No pt The account language. Options: pt (Portuguese); en (English); es (Spanish).
terms Yes n/a The terms and conditions. Options: 1 (Accepted); 0 (Not accepted).

Return Values

If the request is successful, it will return HTTP: 201 CREATED and the following XML response:

<account>
  <id>Account ID</id>
  <name>Company name</name>
  <url>https://companyname.app.invoicexpress.com</url>
  <api_key>aa8e739bbcbb406c90eccbe0825e87c5c1c4c5a9</api_key>
  <state>active</state>
</account>

In case of error it will return one of the following error codes:

Code Description
HTTP: 401 Access denied The API Key parameter is missing or is incorrectly entered.
HTTP: 422 Unprocessable Entity Some parameters were incorrect. See below for possible errors.
Possible Errors for HTTP: 422
<errors>
  <error>Terms and Conditions must be accepted</error>
</errors>
<errors>
  <error>Email is invalid</error>
</errors>