Export Invoice to Xero/QB/FB
curl --request POST \
--url https://api.everhour.com/invoices/{invoice_id}/export \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.everhour.com/invoices/{invoice_id}/export"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.everhour.com/invoices/{invoice_id}/export', 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.everhour.com/invoices/{invoice_id}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.everhour.com/invoices/{invoice_id}/export"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.everhour.com/invoices/{invoice_id}/export")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/invoices/{invoice_id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 2660155,
"client": {
"id": 4567,
"name": "Client Name",
"projects": [
"ev:1234567890"
],
"businessDetails": "<string>",
"budget": {
"type": "money",
"budget": 100000,
"period": "general",
"appliedFrom": "<string>",
"disallowOverbudget": true,
"excludeUnbillableTime": true,
"excludeExpenses": true,
"threshold": 123,
"progress": 0
}
},
"createdAt": "2018-01-16 12:42:59",
"createdBy": {
"id": 1304,
"name": "User Name",
"role": "admin",
"status": "active",
"headline": "CEO",
"avatarUrl": "<string>",
"phone": "<string>",
"capacity": 123,
"avatarUrlLarge": "<string>"
},
"status": "draft",
"dateFrom": "<string>",
"dateTill": "<string>",
"dueDate": "<string>",
"discount": {
"amount": 4581,
"rate": 25
},
"expenseMask": "%PROJECT% :: %CATEGORY%",
"includeExpenses": true,
"includeTime": true,
"invoiceItems": [
{
"billedTime": 415860,
"createdAt": "2017-02-22 16:11:33",
"custom": false,
"id": 52,
"listAmount": 288793,
"name": "Software Development",
"netAmount": 288793,
"position": 1,
"taxable": 1,
"totalAmount": 288793
}
],
"issueDate": "2019-03-22",
"limitDateFrom": "<string>",
"limitDateTill": "<string>",
"listAmount": 18325,
"netAmount": 13744,
"projects": [
"gh:63301595"
],
"publicId": "1020",
"tax": {
"id": 123,
"rate": 11,
"amount": 1512
},
"timeMask": "%PROJECT%",
"totalAmount": 15256,
"totalTime": 43980,
"valid": true
}Invoices
Export Invoice to Xero/QB/FB
Export an invoice to a connected external accounting system.
Supports Xero, QuickBooks, and FreshBooks integrations — the destination must be linked to the team beforehand. An invoice can only be exported once; subsequent calls return an error.
POST
/
invoices
/
{invoice_id}
/
export
Export Invoice to Xero/QB/FB
curl --request POST \
--url https://api.everhour.com/invoices/{invoice_id}/export \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.everhour.com/invoices/{invoice_id}/export"
headers = {"X-Api-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.everhour.com/invoices/{invoice_id}/export', 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.everhour.com/invoices/{invoice_id}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);
$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.everhour.com/invoices/{invoice_id}/export"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.everhour.com/invoices/{invoice_id}/export")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/invoices/{invoice_id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 2660155,
"client": {
"id": 4567,
"name": "Client Name",
"projects": [
"ev:1234567890"
],
"businessDetails": "<string>",
"budget": {
"type": "money",
"budget": 100000,
"period": "general",
"appliedFrom": "<string>",
"disallowOverbudget": true,
"excludeUnbillableTime": true,
"excludeExpenses": true,
"threshold": 123,
"progress": 0
}
},
"createdAt": "2018-01-16 12:42:59",
"createdBy": {
"id": 1304,
"name": "User Name",
"role": "admin",
"status": "active",
"headline": "CEO",
"avatarUrl": "<string>",
"phone": "<string>",
"capacity": 123,
"avatarUrlLarge": "<string>"
},
"status": "draft",
"dateFrom": "<string>",
"dateTill": "<string>",
"dueDate": "<string>",
"discount": {
"amount": 4581,
"rate": 25
},
"expenseMask": "%PROJECT% :: %CATEGORY%",
"includeExpenses": true,
"includeTime": true,
"invoiceItems": [
{
"billedTime": 415860,
"createdAt": "2017-02-22 16:11:33",
"custom": false,
"id": 52,
"listAmount": 288793,
"name": "Software Development",
"netAmount": 288793,
"position": 1,
"taxable": 1,
"totalAmount": 288793
}
],
"issueDate": "2019-03-22",
"limitDateFrom": "<string>",
"limitDateTill": "<string>",
"listAmount": 18325,
"netAmount": 13744,
"projects": [
"gh:63301595"
],
"publicId": "1020",
"tax": {
"id": 123,
"rate": 11,
"amount": 1512
},
"timeMask": "%PROJECT%",
"totalAmount": 15256,
"totalTime": 43980,
"valid": true
}Authorizations
Path Parameters
Invoice ID
Example:
11903
Response
OK
Invoice ID
Example:
2660155
Show child attributes
Show child attributes
Example:
"2018-01-16 12:42:59"
Show child attributes
Show child attributes
Available options:
draft, sent, paid, deleted, partial Example:
"draft"
Show child attributes
Show child attributes
Example:
"%PROJECT% :: %CATEGORY%"
Example:
true
Example:
true
Show child attributes
Show child attributes
Example:
"2019-03-22"
List amount in cents (without discount and taxes)
Example:
18325
Net amount in cents (without taxes but with discount applied)
Example:
13744
Example:
["gh:63301595"]
Example:
"1020"
Show child attributes
Show child attributes
Example:
"%PROJECT%"
Total invoice amount in cents (with discount and taxes applied)
Example:
15256
Total invoice time in seconds
Example:
43980
Example:
true
