Patch a fee
curl --request PATCH \
--url https://api.smokeball.com/matters/{matterId}/fees/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"feeDate": "2022-07-01",
"subject": "Review contract",
"updatedByUserId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"staffId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"invoiceId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"activityCode": "PRT",
"feeType": 0,
"description": "Print documents",
"duration": 60,
"durationWorked": 50,
"rate": 350,
"tax": 35,
"taxInclusive": false,
"taxExempt": false,
"taxOutOfScope": false,
"finalized": false,
"isWrittenOff": false,
"isBillable": false,
"isInvoicedExternally": false,
"sourceItems": [
{
"description": "Print document",
"duration": 5,
"isBillable": false
}
],
"createdFromActivityId": "504b9f77-20c7-4dee-8227-d3007c8f6cea"
}
'import requests
url = "https://api.smokeball.com/matters/{matterId}/fees/{id}"
payload = {
"feeDate": "2022-07-01",
"subject": "Review contract",
"updatedByUserId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"staffId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"invoiceId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"activityCode": "PRT",
"feeType": 0,
"description": "Print documents",
"duration": 60,
"durationWorked": 50,
"rate": 350,
"tax": 35,
"taxInclusive": False,
"taxExempt": False,
"taxOutOfScope": False,
"finalized": False,
"isWrittenOff": False,
"isBillable": False,
"isInvoicedExternally": False,
"sourceItems": [
{
"description": "Print document",
"duration": 5,
"isBillable": False
}
],
"createdFromActivityId": "504b9f77-20c7-4dee-8227-d3007c8f6cea"
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
feeDate: '2022-07-01',
subject: 'Review contract',
updatedByUserId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
staffId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
invoiceId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
activityCode: 'PRT',
feeType: 0,
description: 'Print documents',
duration: 60,
durationWorked: 50,
rate: 350,
tax: 35,
taxInclusive: false,
taxExempt: false,
taxOutOfScope: false,
finalized: false,
isWrittenOff: false,
isBillable: false,
isInvoicedExternally: false,
sourceItems: [{description: 'Print document', duration: 5, isBillable: false}],
createdFromActivityId: '504b9f77-20c7-4dee-8227-d3007c8f6cea'
})
};
fetch('https://api.smokeball.com/matters/{matterId}/fees/{id}', 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.smokeball.com/matters/{matterId}/fees/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'feeDate' => '2022-07-01',
'subject' => 'Review contract',
'updatedByUserId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'staffId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'invoiceId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'activityCode' => 'PRT',
'feeType' => 0,
'description' => 'Print documents',
'duration' => 60,
'durationWorked' => 50,
'rate' => 350,
'tax' => 35,
'taxInclusive' => false,
'taxExempt' => false,
'taxOutOfScope' => false,
'finalized' => false,
'isWrittenOff' => false,
'isBillable' => false,
'isInvoicedExternally' => false,
'sourceItems' => [
[
'description' => 'Print document',
'duration' => 5,
'isBillable' => false
]
],
'createdFromActivityId' => '504b9f77-20c7-4dee-8227-d3007c8f6cea'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+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.smokeball.com/matters/{matterId}/fees/{id}"
payload := strings.NewReader("{\n \"feeDate\": \"2022-07-01\",\n \"subject\": \"Review contract\",\n \"updatedByUserId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"staffId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"invoiceId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"activityCode\": \"PRT\",\n \"feeType\": 0,\n \"description\": \"Print documents\",\n \"duration\": 60,\n \"durationWorked\": 50,\n \"rate\": 350,\n \"tax\": 35,\n \"taxInclusive\": false,\n \"taxExempt\": false,\n \"taxOutOfScope\": false,\n \"finalized\": false,\n \"isWrittenOff\": false,\n \"isBillable\": false,\n \"isInvoicedExternally\": false,\n \"sourceItems\": [\n {\n \"description\": \"Print document\",\n \"duration\": 5,\n \"isBillable\": false\n }\n ],\n \"createdFromActivityId\": \"504b9f77-20c7-4dee-8227-d3007c8f6cea\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.smokeball.com/matters/{matterId}/fees/{id}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"feeDate\": \"2022-07-01\",\n \"subject\": \"Review contract\",\n \"updatedByUserId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"staffId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"invoiceId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"activityCode\": \"PRT\",\n \"feeType\": 0,\n \"description\": \"Print documents\",\n \"duration\": 60,\n \"durationWorked\": 50,\n \"rate\": 350,\n \"tax\": 35,\n \"taxInclusive\": false,\n \"taxExempt\": false,\n \"taxOutOfScope\": false,\n \"finalized\": false,\n \"isWrittenOff\": false,\n \"isBillable\": false,\n \"isInvoicedExternally\": false,\n \"sourceItems\": [\n {\n \"description\": \"Print document\",\n \"duration\": 5,\n \"isBillable\": false\n }\n ],\n \"createdFromActivityId\": \"504b9f77-20c7-4dee-8227-d3007c8f6cea\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/fees/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"feeDate\": \"2022-07-01\",\n \"subject\": \"Review contract\",\n \"updatedByUserId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"staffId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"invoiceId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"activityCode\": \"PRT\",\n \"feeType\": 0,\n \"description\": \"Print documents\",\n \"duration\": 60,\n \"durationWorked\": 50,\n \"rate\": 350,\n \"tax\": 35,\n \"taxInclusive\": false,\n \"taxExempt\": false,\n \"taxOutOfScope\": false,\n \"finalized\": false,\n \"isWrittenOff\": false,\n \"isBillable\": false,\n \"isInvoicedExternally\": false,\n \"sourceItems\": [\n {\n \"description\": \"Print document\",\n \"duration\": 5,\n \"isBillable\": false\n }\n ],\n \"createdFromActivityId\": \"504b9f77-20c7-4dee-8227-d3007c8f6cea\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Fees
Patch a fee
Patches a fee for the specified matter.
PATCH
/
matters
/
{matterId}
/
fees
/
{id}
Patch a fee
curl --request PATCH \
--url https://api.smokeball.com/matters/{matterId}/fees/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json-patch+json' \
--header 'x-api-key: <api-key>' \
--data '
{
"feeDate": "2022-07-01",
"subject": "Review contract",
"updatedByUserId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"staffId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"invoiceId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"activityCode": "PRT",
"feeType": 0,
"description": "Print documents",
"duration": 60,
"durationWorked": 50,
"rate": 350,
"tax": 35,
"taxInclusive": false,
"taxExempt": false,
"taxOutOfScope": false,
"finalized": false,
"isWrittenOff": false,
"isBillable": false,
"isInvoicedExternally": false,
"sourceItems": [
{
"description": "Print document",
"duration": 5,
"isBillable": false
}
],
"createdFromActivityId": "504b9f77-20c7-4dee-8227-d3007c8f6cea"
}
'import requests
url = "https://api.smokeball.com/matters/{matterId}/fees/{id}"
payload = {
"feeDate": "2022-07-01",
"subject": "Review contract",
"updatedByUserId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"staffId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"invoiceId": "750eb5c5-ac0b-7d11-4997-e0ce9d8896c8",
"activityCode": "PRT",
"feeType": 0,
"description": "Print documents",
"duration": 60,
"durationWorked": 50,
"rate": 350,
"tax": 35,
"taxInclusive": False,
"taxExempt": False,
"taxOutOfScope": False,
"finalized": False,
"isWrittenOff": False,
"isBillable": False,
"isInvoicedExternally": False,
"sourceItems": [
{
"description": "Print document",
"duration": 5,
"isBillable": False
}
],
"createdFromActivityId": "504b9f77-20c7-4dee-8227-d3007c8f6cea"
}
headers = {
"x-api-key": "<api-key>",
"Authorization": "<api-key>",
"Content-Type": "application/json-patch+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-api-key': '<api-key>',
Authorization: '<api-key>',
'Content-Type': 'application/json-patch+json'
},
body: JSON.stringify({
feeDate: '2022-07-01',
subject: 'Review contract',
updatedByUserId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
staffId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
invoiceId: '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
activityCode: 'PRT',
feeType: 0,
description: 'Print documents',
duration: 60,
durationWorked: 50,
rate: 350,
tax: 35,
taxInclusive: false,
taxExempt: false,
taxOutOfScope: false,
finalized: false,
isWrittenOff: false,
isBillable: false,
isInvoicedExternally: false,
sourceItems: [{description: 'Print document', duration: 5, isBillable: false}],
createdFromActivityId: '504b9f77-20c7-4dee-8227-d3007c8f6cea'
})
};
fetch('https://api.smokeball.com/matters/{matterId}/fees/{id}', 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.smokeball.com/matters/{matterId}/fees/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'feeDate' => '2022-07-01',
'subject' => 'Review contract',
'updatedByUserId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'staffId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'invoiceId' => '750eb5c5-ac0b-7d11-4997-e0ce9d8896c8',
'activityCode' => 'PRT',
'feeType' => 0,
'description' => 'Print documents',
'duration' => 60,
'durationWorked' => 50,
'rate' => 350,
'tax' => 35,
'taxInclusive' => false,
'taxExempt' => false,
'taxOutOfScope' => false,
'finalized' => false,
'isWrittenOff' => false,
'isBillable' => false,
'isInvoicedExternally' => false,
'sourceItems' => [
[
'description' => 'Print document',
'duration' => 5,
'isBillable' => false
]
],
'createdFromActivityId' => '504b9f77-20c7-4dee-8227-d3007c8f6cea'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json-patch+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.smokeball.com/matters/{matterId}/fees/{id}"
payload := strings.NewReader("{\n \"feeDate\": \"2022-07-01\",\n \"subject\": \"Review contract\",\n \"updatedByUserId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"staffId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"invoiceId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"activityCode\": \"PRT\",\n \"feeType\": 0,\n \"description\": \"Print documents\",\n \"duration\": 60,\n \"durationWorked\": 50,\n \"rate\": 350,\n \"tax\": 35,\n \"taxInclusive\": false,\n \"taxExempt\": false,\n \"taxOutOfScope\": false,\n \"finalized\": false,\n \"isWrittenOff\": false,\n \"isBillable\": false,\n \"isInvoicedExternally\": false,\n \"sourceItems\": [\n {\n \"description\": \"Print document\",\n \"duration\": 5,\n \"isBillable\": false\n }\n ],\n \"createdFromActivityId\": \"504b9f77-20c7-4dee-8227-d3007c8f6cea\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.smokeball.com/matters/{matterId}/fees/{id}")
.header("x-api-key", "<api-key>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"feeDate\": \"2022-07-01\",\n \"subject\": \"Review contract\",\n \"updatedByUserId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"staffId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"invoiceId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"activityCode\": \"PRT\",\n \"feeType\": 0,\n \"description\": \"Print documents\",\n \"duration\": 60,\n \"durationWorked\": 50,\n \"rate\": 350,\n \"tax\": 35,\n \"taxInclusive\": false,\n \"taxExempt\": false,\n \"taxOutOfScope\": false,\n \"finalized\": false,\n \"isWrittenOff\": false,\n \"isBillable\": false,\n \"isInvoicedExternally\": false,\n \"sourceItems\": [\n {\n \"description\": \"Print document\",\n \"duration\": 5,\n \"isBillable\": false\n }\n ],\n \"createdFromActivityId\": \"504b9f77-20c7-4dee-8227-d3007c8f6cea\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smokeball.com/matters/{matterId}/fees/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"feeDate\": \"2022-07-01\",\n \"subject\": \"Review contract\",\n \"updatedByUserId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"staffId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"invoiceId\": \"750eb5c5-ac0b-7d11-4997-e0ce9d8896c8\",\n \"activityCode\": \"PRT\",\n \"feeType\": 0,\n \"description\": \"Print documents\",\n \"duration\": 60,\n \"durationWorked\": 50,\n \"rate\": 350,\n \"tax\": 35,\n \"taxInclusive\": false,\n \"taxExempt\": false,\n \"taxOutOfScope\": false,\n \"finalized\": false,\n \"isWrittenOff\": false,\n \"isBillable\": false,\n \"isInvoicedExternally\": false,\n \"sourceItems\": [\n {\n \"description\": \"Print document\",\n \"duration\": 5,\n \"isBillable\": false\n }\n ],\n \"createdFromActivityId\": \"504b9f77-20c7-4dee-8227-d3007c8f6cea\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"href": "<string>",
"relation": "<string>",
"method": "GET"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Body
application/json-patch+jsonapplication/jsonapplication/*+json
If true, the amount is tax inclusive, otherwise tax exclusive. Only applicable in AU and UK regions.
Tax inclusive means: Amount exc. tax = Amount - Tax, Amount inc. tax = Amount.
Tax exclusive means: Amount exc. tax = Amount, Amount inc. tax = Amount + Tax.
(Amount = Rate for fixed fees, or Rate * Duration for time fees, Tax = value of the Tax field)
Example:
false