Skip to main content
GET
/
api
/
drafts
/
List Draft Documents
curl --request GET \
  --url https://api.e-invoice.be/api/drafts/ \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.e-invoice.be/api/drafts/"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.e-invoice.be/api/drafts/', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.e-invoice.be/api/drafts/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>"
  ],
]);

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

func main() {

	url := "https://api.e-invoice.be/api/drafts/"

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

	req.Header.Add("Authorization", "Bearer <token>")

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

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

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.e-invoice.be/api/drafts/")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.e-invoice.be/api/drafts/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "document_type": "INVOICE",
      "state": "DRAFT",
      "direction": "OUTBOUND",
      "customer_name": "<string>",
      "customer_id": "<string>",
      "customer_email": "<string>",
      "purchase_order": "<string>",
      "invoice_id": "<string>",
      "invoice_date": "2023-12-25",
      "due_date": "2023-12-25",
      "note": "<string>",
      "vendor_name": "<string>",
      "vendor_email": "<string>",
      "vendor_address": "<string>",
      "vendor_address_recipient": "<string>",
      "customer_address": "<string>",
      "customer_address_recipient": "<string>",
      "billing_address": "<string>",
      "billing_address_recipient": "<string>",
      "shipping_address": "<string>",
      "shipping_address_recipient": "<string>",
      "currency": "EUR",
      "tax_code": "S",
      "vatex_note": "<string>",
      "subtotal": "<string>",
      "total_discount": "<string>",
      "total_tax": "<string>",
      "invoice_total": "<string>",
      "amount_due": "<string>",
      "remittance_address": "<string>",
      "remittance_address_recipient": "<string>",
      "service_address": "<string>",
      "service_address_recipient": "<string>",
      "service_start_date": "2023-12-25",
      "service_end_date": "2023-12-25",
      "vendor_tax_id": "BE1018265814",
      "vendor_company_id": "1018265814",
      "customer_tax_id": "BE1018265814",
      "customer_company_id": "1018265814",
      "customer_peppol_id": "0208:0123456789",
      "payment_term": "<string>",
      "payment_details": [
        {
          "iban": "<string>",
          "swift": "<string>",
          "bank_account_number": "<string>",
          "payment_reference": "<string>"
        }
      ],
      "tax_details": [
        {
          "amount": "<string>",
          "rate": "<string>"
        }
      ],
      "items": [
        {
          "amount": "<string>",
          "date": null,
          "description": "<string>",
          "quantity": "<string>",
          "product_code": "<string>",
          "tax": "<string>",
          "tax_rate": "21.00",
          "unit_price": "<string>",
          "allowances": [
            {
              "reason": "<string>",
              "multiplier_factor": "<string>",
              "amount": "<string>",
              "base_amount": "<string>",
              "tax_rate": 21,
              "tax_code": "S"
            }
          ],
          "charges": [
            {
              "reason": "<string>",
              "multiplier_factor": "<string>",
              "amount": "<string>",
              "base_amount": "<string>",
              "tax_rate": "21.00",
              "tax_code": "S"
            }
          ]
        }
      ],
      "attachments": [
        {
          "file_name": "<string>",
          "id": "<string>",
          "file_type": "application/pdf",
          "file_size": 0,
          "file_url": "<string>"
        }
      ],
      "allowances": [
        {
          "reason": "<string>",
          "multiplier_factor": "<string>",
          "amount": "<string>",
          "base_amount": "<string>",
          "tax_rate": 21,
          "tax_code": "S"
        }
      ],
      "charges": [
        {
          "reason": "<string>",
          "multiplier_factor": "<string>",
          "amount": "<string>",
          "base_amount": "<string>",
          "tax_rate": "21.00",
          "tax_code": "S"
        }
      ]
    }
  ],
  "total": 123,
  "page": 123,
  "page_size": 123,
  "pages": 123,
  "has_next_page": true
}
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

page
integer
default:1

Page number

Required range: x >= 1
page_size
integer
default:20

Number of items per page

Required range: 1 <= x <= 100
state
enum<string> | null

Filter by document state. By default return all states (DRAFT, TRANSIT, FAILED).

Available options:
DRAFT,
TRANSIT,
FAILED,
SENT,
RECEIVED
type
enum<string> | null

Filter by document type

Available options:
INVOICE,
CREDIT_NOTE,
DEBIT_NOTE,
SELFBILLING_INVOICE,
SELFBILLING_CREDIT_NOTE
date_from
string<date-time> | null

Filter by issue date (from)

date_to
string<date-time> | null

Filter by issue date (to)

search
string | null

Search in invoice number, seller/buyer names

sort_by
enum<string>
default:created_at

Field to sort by

Available options:
created_at,
invoice_date,
due_date,
invoice_total,
customer_name,
vendor_name,
invoice_id
sort_order
enum<string>
default:desc

Sort direction (asc/desc)

Available options:
asc,
desc

Response

Successful Response

items
DocumentResponse · object[]
required
total
integer
required
page
integer
required
page_size
integer
required
pages
integer
required
has_next_page
boolean
required