InvoiceXpress API

Sequences

A Sequence is used to group invoices in a sequential order.

List All

GET /sequences.json

Returns all your sequences.

Example Request

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

url = URI("https://account_name.app.invoicexpress.com/sequences.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": "/sequences.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", "/sequences.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/sequences.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/sequences.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))

}

Responses

200 Success Sequences List all
{
  sequences: [
Array
    {
    { ... }
Object

List of Sequences Object

      "id": 146090,
Integer
      "serie": "A",
String
      "default_sequence": 1,
Integer
      "current_invoice_number": 5,
Integer
      "current_invoice_sequence_id": 146090,
Integer
      "current_invoice_receipt_number": 0,
Integer
      "current_invoice_receipt_sequence_id": 146092,
Integer
      "current_simplified_invoice_number": 0,
Integer
      "current_simplified_invoice_sequence_id": 146091,
Integer
      "current_credit_note_number": 0,
Integer
      "current_credit_note_sequence_id": 146095,
Integer
      "current_debit_note_number": 0,
Integer
      "current_debit_note_sequence_id": 146094,
Integer
      "current_receipt_number": 0,
Integer
      "current_receipt_sequence_id": 146093,
Integer
      "current_shipping_number": 0,
Integer
      "current_shipping_sequence_id": 146104,
Integer
      "current_transport_number": 1,
Integer
      "current_transport_sequence_id": 146106,
Integer
      "current_devolution_number": 0,
Integer
      "current_devolution_sequence_id": 146105,
Integer
      "current_proforma_number": 0,
Integer
      "current_proforma_sequence_id": 146102,
Integer
      "current_quote_number": 2,
Integer
      "current_quote_sequence_id": 146101,
Integer
      "current_fees_note_number": 0,
Integer
      "current_fees_note_sequence_id": 146103,
Integer
      "current_purchase_order_number": 0,
Integer
      "current_purchase_order_sequence_id": 146100,
Integer
      "current_vat_moss_invoice_number": 3,
Integer
      "current_vat_moss_invoice_sequence_id": 146097,
Integer
      "current_vat_moss_credit_note_number": 0,
Integer
      "current_vat_moss_credit_note_sequence_id": 146098,
Integer
      "current_vat_moss_receipt_number": 1,
Integer
      "current_vat_moss_receipt_sequence_id": 146099
Integer
    }
  ]
}
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)

Get

GET /sequences/:sequence-id.json

Returns a specific sequence.

Example Request

Format:
curl --request GET \
  --url 'https://account_name.app.invoicexpress.com/sequences/:sequence-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/sequences/:sequence-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": "/sequences/:sequence-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", "/sequences/:sequence-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/sequences/:sequence-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/sequences/:sequence-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
sequence-id Integer Required

The ID of the sequence you want to get.

42

Responses

200 Success Sequences Get
{
  "sequence": {
  "sequence": { ... }
Object
    "id": 146090,
Integer
    "serie": "A",
String
    "default_sequence": 1,
Integer
    "current_invoice_number": 5,
Integer
    "current_invoice_sequence_id": 146090,
Integer
    "current_invoice_receipt_number": 0,
Integer
    "current_invoice_receipt_sequence_id": 146092,
Integer
    "current_simplified_invoice_number": 0,
Integer
    "current_simplified_invoice_sequence_id": 146091,
Integer
    "current_credit_note_number": 0,
Integer
    "current_credit_note_sequence_id": 146095,
Integer
    "current_debit_note_number": 0,
Integer
    "current_debit_note_sequence_id": 146094,
Integer
    "current_receipt_number": 0,
Integer
    "current_receipt_sequence_id": 146093,
Integer
    "current_shipping_number": 0,
Integer
    "current_shipping_sequence_id": 146104,
Integer
    "current_transport_number": 1,
Integer
    "current_transport_sequence_id": 146106,
Integer
    "current_devolution_number": 0,
Integer
    "current_devolution_sequence_id": 146105,
Integer
    "current_proforma_number": 0,
Integer
    "current_proforma_sequence_id": 146102,
Integer
    "current_quote_number": 2,
Integer
    "current_quote_sequence_id": 146101,
Integer
    "current_fees_note_number": 0,
Integer
    "current_fees_note_sequence_id": 146103,
Integer
    "current_purchase_order_number": 0,
Integer
    "current_purchase_order_sequence_id": 146100,
Integer
    "current_vat_moss_invoice_number": 3,
Integer
    "current_vat_moss_invoice_sequence_id": 146097,
Integer
    "current_vat_moss_credit_note_number": 0,
Integer
    "current_vat_moss_credit_note_sequence_id": 146098,
Integer
    "current_vat_moss_receipt_number": 1,
Integer
    "current_vat_moss_receipt_sequence_id": 146099
Integer
  }
}
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)
404 Not Found

No sequence matches the supplied sequence-id.

(Empty Response)

Update

PUT /sequences/:sequence-id/set_current.json

Sets a specific sequence as the default.

Example Request

Format:
curl --request PUT \
  --url 'https://account_name.app.invoicexpress.com/sequences/:sequence-id/set_current.json?api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001'
require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/sequences/:sequence-id/set_current.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"] = 'multipart/form-data; boundary=---011000010111000001101001'

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": "/sequences/:sequence-id/set_current.json?api_key=YOUR%20API%20KEY%20HERE",
  "headers": {
    "accept": "application/json",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

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")

payload = ""

headers = {
    'accept': "application/json",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("PUT", "/sequences/:sequence-id/set_current.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/sequences/:sequence-id/set_current.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 => "",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$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/sequences/:sequence-id/set_current.json?api_key=YOUR%20API%20KEY%20HERE"

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

	req.Header.Add("accept", "application/json")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	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
sequence-id Integer Required

The sequence to set as the default.

42

Responses

200 Success

The sequence was set as the default successfully.

(Empty Response)
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)
404 Not Found

No sequence matches the supplied sequence-id.

(Empty Response)
422 Unprocessable Entity

Some parameters were incorrect.

(Empty Response)

Create

POST /sequences.json

Creates a new sequence.

Example Body

{
  "sequence": {
    "serie": "2017",
    "default_sequence": "1"
  }
}

Example Request

Format:
curl --request POST \
  --url 'https://account_name.app.invoicexpress.com/sequences.json?api_key=YOUR%20API%20KEY%20HERE' \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --data '{"sequence":{"serie":"2017","default_sequence":"1"}}'
require 'uri'
require 'net/http'

url = URI("https://account_name.app.invoicexpress.com/sequences.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 = "{\"sequence\":{\"serie\":\"2017\",\"default_sequence\":\"1\"}}"

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": "/sequences.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({ sequence: { serie: '2017', default_sequence: '1' } }));
req.end();
import http.client

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

payload = "{\"sequence\":{\"serie\":\"2017\",\"default_sequence\":\"1\"}}"

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

conn.request("POST", "/sequences.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/sequences.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 => "{\"sequence\":{\"serie\":\"2017\",\"default_sequence\":\"1\"}}",
  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/sequences.json?api_key=YOUR%20API%20KEY%20HERE"

	payload := strings.NewReader("{\"sequence\":{\"serie\":\"2017\",\"default_sequence\":\"1\"}}")

	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
sequence Object Required

Sequence data to be created.

{
  "sequence": {
  "sequence": { ... }
Object
    "serie": "2017",
String

[Required] Series name.

    "default_sequence": "1"
String

[Optional] If 1, this sequence is chosen as the default sequence on your account. Other values are ignored.

  }
}

Responses

201 Success Sequences Get
{
  "sequence": {
  "sequence": { ... }
Object
    "id": 146090,
Integer
    "serie": "A",
String
    "default_sequence": 1,
Integer
    "current_invoice_number": 5,
Integer
    "current_invoice_sequence_id": 146090,
Integer
    "current_invoice_receipt_number": 0,
Integer
    "current_invoice_receipt_sequence_id": 146092,
Integer
    "current_simplified_invoice_number": 0,
Integer
    "current_simplified_invoice_sequence_id": 146091,
Integer
    "current_credit_note_number": 0,
Integer
    "current_credit_note_sequence_id": 146095,
Integer
    "current_debit_note_number": 0,
Integer
    "current_debit_note_sequence_id": 146094,
Integer
    "current_receipt_number": 0,
Integer
    "current_receipt_sequence_id": 146093,
Integer
    "current_shipping_number": 0,
Integer
    "current_shipping_sequence_id": 146104,
Integer
    "current_transport_number": 1,
Integer
    "current_transport_sequence_id": 146106,
Integer
    "current_devolution_number": 0,
Integer
    "current_devolution_sequence_id": 146105,
Integer
    "current_proforma_number": 0,
Integer
    "current_proforma_sequence_id": 146102,
Integer
    "current_quote_number": 2,
Integer
    "current_quote_sequence_id": 146101,
Integer
    "current_fees_note_number": 0,
Integer
    "current_fees_note_sequence_id": 146103,
Integer
    "current_purchase_order_number": 0,
Integer
    "current_purchase_order_sequence_id": 146100,
Integer
    "current_vat_moss_invoice_number": 3,
Integer
    "current_vat_moss_invoice_sequence_id": 146097,
Integer
    "current_vat_moss_credit_note_number": 0,
Integer
    "current_vat_moss_credit_note_sequence_id": 146098,
Integer
    "current_vat_moss_receipt_number": 1,
Integer
    "current_vat_moss_receipt_sequence_id": 146099
Integer
  }
}
401 Access denied

The API Key parameter is missing or is incorrectly entered.

(Empty Response)
422 Unprocessable Entity

Some parameters were incorrect.

(Empty Response)