InvoiceXpress API

Items

An Item is the product or service you invoice.

List All

GET /items.json

Returns a list of all your items.

Example Request

Format:
curl --request GET \
  --url 'https://account_name.app.invoicexpress.com/items.json?page=1&per_page=30&api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json'
require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/items.json?page=1&per_page=30&api_key=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "account_name.app.invoicexpress.com",
  "port": null,
  "path": "/items.json?page=1&per_page=30&api_key=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("account_name.app.invoicexpress.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/items.json?page=1&per_page=30&api_key=YOUR%20API%20KEY%20HERE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://account_name.app.invoicexpress.com/items.json?page=1&per_page=30&api_key=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://account_name.app.invoicexpress.com/items.json?page=1&per_page=30&api_key=YOUR%20API%20KEY%20HERE"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Query Parameters

Name Type Required Description Example
page Integer Optional

You can ask for a specific page of items. Defaults to 1.

1
per_page Integer Optional

You can specify how many results you want to fetch. Defaults to 10 or value defined in account settings (10, 20 or 30).

30

Responses

200 Success Items List all
{
  items: [
Array
    {
    { ... }
Object

Items

      "id": 402322,
Integer
      "name": "Large",
String
      "description": "foo",
String
      "unit_price": 24.3902,
Number
      "unit": "service",
String
      "tax": {
      "tax": { ... }
Object
        "name": "IVA23",
String
        "value": 23,
Integer
        "comment": "tax value:23.0%"
String
      }
    }
  ]
}
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)

Get

GET /items/:item-id.json

Returns a specific item.

Example Request

Format:
curl --request GET \
  --url 'https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json'
require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "account_name.app.invoicexpress.com",
  "port": null,
  "path": "/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("account_name.app.invoicexpress.com")

headers = { 'accept': "application/json" }

conn.request("GET", "/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
item-id Integer Required

The ID of the item you want to get.

42

Responses

200 Success Items Get
{
  "item": {
  "item": { ... }
Object
    "id": 402321,
Integer
    "name": "Medium",
String
    "description": "foo",
String
    "unit_price": 16.2602,
Number
    "unit": "service",
String
    "tax": {
    "tax": { ... }
Object
      "name": "IVA23",
String
      "value": 23,
Integer
      "comment": "tax value:23.0%"
String
    }
  }
}
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)
404 Not Found

No item matches the supplied item-id.

(Empty Response)

Update

PUT /items/:item-id.json

Updates an item.

Example Body

{
  "item": {
    "name": "Item name",
    "description": "Item description",
    "unit_price": "9.99",
    "unit": "service",
    "tax": {
      "name": "IVA23"
    }
  }
}

Example Request

Format:
curl --request PUT \
  --url 'https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"item":{"name":"Item name","description":"Item description","unit_price":"9.99","unit":"service","tax":{"name":"IVA23"}}}'
require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request.body = "{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "PUT",
  "hostname": "account_name.app.invoicexpress.com",
  "port": null,
  "path": "/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ item: 
   { name: 'Item name',
     description: 'Item description',
     unit_price: '9.99',
     unit: 'service',
     tax: { name: 'IVA23' } } }));
req.end();
import http.client

conn = http.client.HTTPSConnection("account_name.app.invoicexpress.com")

payload = "{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}"

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("PUT", "/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE"

	payload := strings.NewReader("{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
item-id Integer Required

The ID of the item to be updated.

42

Request Body

Name Type Required Description Example
item Object Required

Item data to be updated.

{
  "item": {
  "item": { ... }
Object
    "name": "Item name",
String

[Required/Optional] Name of the item. Must be unique. Required when using Create. Optional when using Update.

    "description": "Item description",
String

[Required/Optional] Description of the item. Required when using Create. Optional when using Update.

    "unit_price": "9.99",
String

[Required] Item’s unit price. Must be a number equal or greater than 0.0.

    "unit": "service",
String

[Optional] The item unit of measure.

    "tax": {
    "tax": { ... }
Object

[Optional] The tax applied to the item line. If not present no tax is applied to the item

      "name": "IVA23"
String

[Optional] The tax name to be used on this item line. If not found no tax is applied to the line item.

    }
  }
}

Responses

200 Success (Empty Response)
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)
404 Not Found

No item matches the supplied item-id.

(Empty Response)
422 Unprocessable Entity

Some parameters were incorrect.

(Empty Response)

Create

POST /items.json

Creates a new item.

Example Body

{
  "item": {
    "name": "Item name",
    "description": "Item description",
    "unit_price": "9.99",
    "unit": "service",
    "tax": {
      "name": "IVA23"
    }
  }
}

Example Request

Format:
curl --request POST \
  --url 'https://account_name.app.invoicexpress.com/items.json?api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"item":{"name":"Item name","description":"Item description","unit_price":"9.99","unit":"service","tax":{"name":"IVA23"}}}'
require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/items.json?api_key=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["content-type"] = 'application/json'
request.body = "{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "account_name.app.invoicexpress.com",
  "port": null,
  "path": "/items.json?api_key=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json",
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ item: 
   { name: 'Item name',
     description: 'Item description',
     unit_price: '9.99',
     unit: 'service',
     tax: { name: 'IVA23' } } }));
req.end();
import http.client

conn = http.client.HTTPSConnection("account_name.app.invoicexpress.com")

payload = "{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}"

headers = {
    'accept': "application/json",
    'content-type': "application/json"
    }

conn.request("POST", "/items.json?api_key=YOUR%20API%20KEY%20HERE", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://account_name.app.invoicexpress.com/items.json?api_key=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://account_name.app.invoicexpress.com/items.json?api_key=YOUR%20API%20KEY%20HERE"

	payload := strings.NewReader("{\"item\":{\"name\":\"Item name\",\"description\":\"Item description\",\"unit_price\":\"9.99\",\"unit\":\"service\",\"tax\":{\"name\":\"IVA23\"}}}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Request Body

Name Type Required Description Example
item Object Required

Item data to be created.

{
  "item": {
  "item": { ... }
Object
    "name": "Item name",
String

[Required/Optional] Name of the item. Must be unique. Required when using Create. Optional when using Update.

    "description": "Item description",
String

[Required/Optional] Description of the item. Required when using Create. Optional when using Update.

    "unit_price": "9.99",
String

[Required] Item’s unit price. Must be a number equal or greater than 0.0.

    "unit": "service",
String

[Optional] The item unit of measure.

    "tax": {
    "tax": { ... }
Object

[Optional] The tax applied to the item line. If not present no tax is applied to the item

      "name": "IVA23"
String

[Optional] The tax name to be used on this item line. If not found no tax is applied to the line item.

    }
  }
}

Responses

201 Success Items Get
{
  "item": {
  "item": { ... }
Object
    "id": 402321,
Integer
    "name": "Medium",
String
    "description": "foo",
String
    "unit_price": 16.2602,
Number
    "unit": "service",
String
    "tax": {
    "tax": { ... }
Object
      "name": "IVA23",
String
      "value": 23,
Integer
      "comment": "tax value:23.0%"
String
    }
  }
}
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)
422 Unprocessable Entity

Some parameters were incorrect.

(Empty Response)

Delete

DELETE /items/:item-id.json

Deletes an item.

Example Request

Format:
curl --request DELETE \
  --url 'https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json'
require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["accept"] = 'application/json'

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "DELETE",
  "hostname": "account_name.app.invoicexpress.com",
  "port": null,
  "path": "/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
import http.client

conn = http.client.HTTPSConnection("account_name.app.invoicexpress.com")

headers = { 'accept': "application/json" }

conn.request("DELETE", "/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://account_name.app.invoicexpress.com/items/:item-id.json?api_key=YOUR%20API%20KEY%20HERE"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("accept", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Path Parameters

Name Type Required Description Example
item-id Integer Required

The ID of the item to be deleted.

42

Responses

200 Success (Empty Response)
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)
404 Not Found

No item matches the supplied item-id.

(Empty Response)