API-v2

Application Programming Interface

InvoiceXpress Documentation



List All


GET /sequences.json

Returns all your sequences.

Example Request

curl

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

Ruby

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

Node

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();

Python

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

<?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;
}

Go

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
401 ACCESS DENIED
The API Key parameter is missing or is incorrectly entered.
(Empty Response)

Example Success Body Response

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