Refresh Invoice Line Items
Changed onRefresh 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.
Request
- Base URLhttps://api.everhour.com
- AuthAPI key in header X-Api-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Invoice ID
Request body
Example request
{
"limitDateFrom": "2019-03-11",
"limitDateTill": "2019-03-13",
"includeExpenses": true,
"includeTime": true,
"projects": [
"gh:63301595"
],
"expenseMask": "%PROJECT% :: %CATEGORY%",
"timeMask": "%PROJECT%"
}Response
OK
Example response
{
"id": 2660155,
"client": {
"id": 4567,
"name": "Client Name",
"projects": [
"ev:1234567890"
],
"budget": {
"type": "money",
"budget": 100000,
"period": "general"
}
},
"createdAt": "2018-01-16 12:42:59",
"createdBy": {
"id": 1304,
"email": "john.bender@example.com",
"name": "John Bender",
"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",
"role": "admin",
"status": "active",
"type": "employee",
"createdAt": "2016-08-13 15:27:30",
"isEmailVerified": true,
"capacity": 144000,
"cost": 2500,
"groups": [
{
"id": 1,
"name": "Admins"
}
],
"permissions": {
"billingBudgets": "write",
"userLimits": "write",
"costs": "write",
"invoices": "write",
"expenses": "write"
},
"timeTrackingPolicy": {
"allowTimeWithoutTask": true,
"allowManualTimeInput": true,
"allowCompletedTaskTime": true,
"allowTimeWithoutEstimate": true,
"allowManageEstimates": true,
"lockTimeAfter": 2,
"lockTimePeriod": "days"
}
},
"discount": {
"amount": 4581,
"rate": 25
},
"expenseMask": "%PROJECT% :: %CATEGORY%",
"includeExpenses": true,
"includeTime": true,
"invoiceItems": [
{
"billedTime": 415860,
"createdAt": "2017-02-22 16:11:33",
"id": 52,
"listAmount": 288793,
"name": "Software Development",
"netAmount": 288793,
"position": 1,
"taxable": 1,
"totalAmount": 288793
}
],
"issueDate": "2019-03-22",
"listAmount": 18325,
"netAmount": 13744,
"projects": [
"gh:63301595"
],
"publicId": "1020",
"status": "draft",
"tax": {
"rate": 11,
"amount": 1512
},
"timeMask": "%PROJECT%",
"totalAmount": 15256,
"totalTime": 43980,
"valid": true
}Changes
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status - info
added the required property
/to the response with the status
- info