curl --request POST \
--url https://api.everhour.com/invoices/{invoice_id}/reset-time \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"limitDateFrom": "2019-03-11",
"limitDateTill": "2019-03-13",
"includeExpenses": true,
"includeTime": true,
"projects": [
"gh:63301595"
],
"expenseMask": "%PROJECT% :: %CATEGORY%",
"timeMask": "%PROJECT%",
"showRowNumbers": true
}
'import requests
url = "https://api.everhour.com/invoices/{invoice_id}/reset-time"
payload = {
"limitDateFrom": "2019-03-11",
"limitDateTill": "2019-03-13",
"includeExpenses": True,
"includeTime": True,
"projects": ["gh:63301595"],
"expenseMask": "%PROJECT% :: %CATEGORY%",
"timeMask": "%PROJECT%",
"showRowNumbers": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
limitDateFrom: '2019-03-11',
limitDateTill: '2019-03-13',
includeExpenses: true,
includeTime: true,
projects: ['gh:63301595'],
expenseMask: '%PROJECT% :: %CATEGORY%',
timeMask: '%PROJECT%',
showRowNumbers: true
})
};
fetch('https://api.everhour.com/invoices/{invoice_id}/reset-time', 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}/reset-time",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limitDateFrom' => '2019-03-11',
'limitDateTill' => '2019-03-13',
'includeExpenses' => true,
'includeTime' => true,
'projects' => [
'gh:63301595'
],
'expenseMask' => '%PROJECT% :: %CATEGORY%',
'timeMask' => '%PROJECT%',
'showRowNumbers' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.everhour.com/invoices/{invoice_id}/reset-time"
payload := strings.NewReader("{\n \"limitDateFrom\": \"2019-03-11\",\n \"limitDateTill\": \"2019-03-13\",\n \"includeExpenses\": true,\n \"includeTime\": true,\n \"projects\": [\n \"gh:63301595\"\n ],\n \"expenseMask\": \"%PROJECT% :: %CATEGORY%\",\n \"timeMask\": \"%PROJECT%\",\n \"showRowNumbers\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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}/reset-time")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"limitDateFrom\": \"2019-03-11\",\n \"limitDateTill\": \"2019-03-13\",\n \"includeExpenses\": true,\n \"includeTime\": true,\n \"projects\": [\n \"gh:63301595\"\n ],\n \"expenseMask\": \"%PROJECT% :: %CATEGORY%\",\n \"timeMask\": \"%PROJECT%\",\n \"showRowNumbers\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/invoices/{invoice_id}/reset-time")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limitDateFrom\": \"2019-03-11\",\n \"limitDateTill\": \"2019-03-13\",\n \"includeExpenses\": true,\n \"includeTime\": true,\n \"projects\": [\n \"gh:63301595\"\n ],\n \"expenseMask\": \"%PROJECT% :: %CATEGORY%\",\n \"timeMask\": \"%PROJECT%\",\n \"showRowNumbers\": true\n}"
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,
"email": "john.bender@example.com",
"name": "John Bender",
"role": "admin",
"status": "active",
"type": "employee",
"createdAt": "2016-08-13 15:27:30",
"isEmailVerified": true,
"groups": [
{
"id": 1,
"name": "Admins"
}
],
"permissions": {
"billingBudgets": "write",
"userLimits": "write",
"costs": "write",
"invoices": "write",
"expenses": "write"
},
"timeTrackingPolicy": {
"allowTimeWithoutTask": true,
"allowManualTimeInput": true,
"allowFutureTime": false,
"allowCompletedTaskTime": true,
"allowTimeWithoutEstimate": true,
"allowExceedEstimate": false,
"allowManageEstimates": true,
"lockTimeAfter": 2,
"lockTimePeriod": "days"
},
"favorite": false,
"headline": "CEO",
"phone": "+1 555 0100",
"externalId": "M-3490",
"avatarUrl": "https://d36887svjhykt4.cloudfront.net/users/1304-15ea197d07ca81.jpg",
"avatarUrlLarge": "https://d36887svjhykt4.cloudfront.net/users/1304-15ea197d10830c.jpg",
"capacity": 144000,
"cost": 2500,
"costHistory": null,
"resourcePlannerAccess": {
"viewMine": false,
"editMine": false,
"viewAll": false,
"editAll": false
}
},
"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
}Refresh Invoice Line Items
Refresh an invoice’s line items from current time records.
The invoice’s billable items are rebuilt from the underlying time tracked against the invoice’s client over its date range. Useful when time records have been added, edited, or deleted after the invoice was first generated.
curl --request POST \
--url https://api.everhour.com/invoices/{invoice_id}/reset-time \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"limitDateFrom": "2019-03-11",
"limitDateTill": "2019-03-13",
"includeExpenses": true,
"includeTime": true,
"projects": [
"gh:63301595"
],
"expenseMask": "%PROJECT% :: %CATEGORY%",
"timeMask": "%PROJECT%",
"showRowNumbers": true
}
'import requests
url = "https://api.everhour.com/invoices/{invoice_id}/reset-time"
payload = {
"limitDateFrom": "2019-03-11",
"limitDateTill": "2019-03-13",
"includeExpenses": True,
"includeTime": True,
"projects": ["gh:63301595"],
"expenseMask": "%PROJECT% :: %CATEGORY%",
"timeMask": "%PROJECT%",
"showRowNumbers": True
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
limitDateFrom: '2019-03-11',
limitDateTill: '2019-03-13',
includeExpenses: true,
includeTime: true,
projects: ['gh:63301595'],
expenseMask: '%PROJECT% :: %CATEGORY%',
timeMask: '%PROJECT%',
showRowNumbers: true
})
};
fetch('https://api.everhour.com/invoices/{invoice_id}/reset-time', 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}/reset-time",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limitDateFrom' => '2019-03-11',
'limitDateTill' => '2019-03-13',
'includeExpenses' => true,
'includeTime' => true,
'projects' => [
'gh:63301595'
],
'expenseMask' => '%PROJECT% :: %CATEGORY%',
'timeMask' => '%PROJECT%',
'showRowNumbers' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.everhour.com/invoices/{invoice_id}/reset-time"
payload := strings.NewReader("{\n \"limitDateFrom\": \"2019-03-11\",\n \"limitDateTill\": \"2019-03-13\",\n \"includeExpenses\": true,\n \"includeTime\": true,\n \"projects\": [\n \"gh:63301595\"\n ],\n \"expenseMask\": \"%PROJECT% :: %CATEGORY%\",\n \"timeMask\": \"%PROJECT%\",\n \"showRowNumbers\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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}/reset-time")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"limitDateFrom\": \"2019-03-11\",\n \"limitDateTill\": \"2019-03-13\",\n \"includeExpenses\": true,\n \"includeTime\": true,\n \"projects\": [\n \"gh:63301595\"\n ],\n \"expenseMask\": \"%PROJECT% :: %CATEGORY%\",\n \"timeMask\": \"%PROJECT%\",\n \"showRowNumbers\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.everhour.com/invoices/{invoice_id}/reset-time")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limitDateFrom\": \"2019-03-11\",\n \"limitDateTill\": \"2019-03-13\",\n \"includeExpenses\": true,\n \"includeTime\": true,\n \"projects\": [\n \"gh:63301595\"\n ],\n \"expenseMask\": \"%PROJECT% :: %CATEGORY%\",\n \"timeMask\": \"%PROJECT%\",\n \"showRowNumbers\": true\n}"
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,
"email": "john.bender@example.com",
"name": "John Bender",
"role": "admin",
"status": "active",
"type": "employee",
"createdAt": "2016-08-13 15:27:30",
"isEmailVerified": true,
"groups": [
{
"id": 1,
"name": "Admins"
}
],
"permissions": {
"billingBudgets": "write",
"userLimits": "write",
"costs": "write",
"invoices": "write",
"expenses": "write"
},
"timeTrackingPolicy": {
"allowTimeWithoutTask": true,
"allowManualTimeInput": true,
"allowFutureTime": false,
"allowCompletedTaskTime": true,
"allowTimeWithoutEstimate": true,
"allowExceedEstimate": false,
"allowManageEstimates": true,
"lockTimeAfter": 2,
"lockTimePeriod": "days"
},
"favorite": false,
"headline": "CEO",
"phone": "+1 555 0100",
"externalId": "M-3490",
"avatarUrl": "https://d36887svjhykt4.cloudfront.net/users/1304-15ea197d07ca81.jpg",
"avatarUrlLarge": "https://d36887svjhykt4.cloudfront.net/users/1304-15ea197d10830c.jpg",
"capacity": 144000,
"cost": 2500,
"costHistory": null,
"resourcePlannerAccess": {
"viewMine": false,
"editMine": false,
"viewAll": false,
"editAll": false
}
},
"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
11903
Body
Response
OK
Invoice ID
2660155
Show child attributes
Show child attributes
"2018-01-16 12:42:59"
A team member. GET /team/users and GET /users/me return the full object; user objects nested in other resources may contain a subset of these fields.
Show child attributes
Show child attributes
draft, sent, paid, deleted, partial "draft"
Show child attributes
Show child attributes
"%PROJECT% :: %CATEGORY%"
true
true
Show child attributes
Show child attributes
"2019-03-22"
List amount in cents (without discount and taxes)
18325
Net amount in cents (without taxes but with discount applied)
13744
["gh:63301595"]
"1020"
Show child attributes
Show child attributes
"%PROJECT%"
Total invoice amount in cents (with discount and taxes applied)
15256
Total invoice time in seconds
43980
true
