Save expenses
curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/expenses/expenses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"expenses": [
{
"amount": 50.01,
"bankAccountId": 123,
"id": 123,
"date": "2022-01-04T10:20:00Z",
"salesTaxAmount": 1.01,
"description": "Gas purchase",
"vendorId": 123,
"vendorName": "United Airlines",
"businessId": 123,
"clientId": 123,
"clientName": "<string>",
"categoryId": 123,
"personalCategoryId": 123,
"frequency": "ONE_TIME",
"isParent": true,
"apiExpenseId": "<string>",
"billId": 123,
"childExpenses": [
{
"type": "BUSINESS",
"amount": 50.01,
"status": "ACTIVE",
"id": 123,
"businessId": 123,
"clientId": 123,
"categoryId": 123,
"personalCategoryId": 123,
"description": "Gas purchase",
"salesTaxAmount": 1.01,
"state": "DC",
"vendorId": 123,
"billId": {}
}
],
"customData": {},
"bankTransferId": 123,
"revenueId": 123,
"taxPaymentId": 123,
"v6EntityId": "<string>"
}
]
}
'import requests
url = "https://sandbox.hurdlr.com/rest/v5/expenses/expenses"
payload = { "expenses": [
{
"amount": 50.01,
"bankAccountId": 123,
"id": 123,
"date": "2022-01-04T10:20:00Z",
"salesTaxAmount": 1.01,
"description": "Gas purchase",
"vendorId": 123,
"vendorName": "United Airlines",
"businessId": 123,
"clientId": 123,
"clientName": "<string>",
"categoryId": 123,
"personalCategoryId": 123,
"frequency": "ONE_TIME",
"isParent": True,
"apiExpenseId": "<string>",
"billId": 123,
"childExpenses": [
{
"type": "BUSINESS",
"amount": 50.01,
"status": "ACTIVE",
"id": 123,
"businessId": 123,
"clientId": 123,
"categoryId": 123,
"personalCategoryId": 123,
"description": "Gas purchase",
"salesTaxAmount": 1.01,
"state": "DC",
"vendorId": 123,
"billId": {}
}
],
"customData": {},
"bankTransferId": 123,
"revenueId": 123,
"taxPaymentId": 123,
"v6EntityId": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
expenses: [
{
amount: 50.01,
bankAccountId: 123,
id: 123,
date: '2022-01-04T10:20:00Z',
salesTaxAmount: 1.01,
description: 'Gas purchase',
vendorId: 123,
vendorName: 'United Airlines',
businessId: 123,
clientId: 123,
clientName: '<string>',
categoryId: 123,
personalCategoryId: 123,
frequency: 'ONE_TIME',
isParent: true,
apiExpenseId: '<string>',
billId: 123,
childExpenses: [
{
type: 'BUSINESS',
amount: 50.01,
status: 'ACTIVE',
id: 123,
businessId: 123,
clientId: 123,
categoryId: 123,
personalCategoryId: 123,
description: 'Gas purchase',
salesTaxAmount: 1.01,
state: 'DC',
vendorId: 123,
billId: {}
}
],
customData: {},
bankTransferId: 123,
revenueId: 123,
taxPaymentId: 123,
v6EntityId: '<string>'
}
]
})
};
fetch('https://sandbox.hurdlr.com/rest/v5/expenses/expenses', 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://sandbox.hurdlr.com/rest/v5/expenses/expenses",
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([
'expenses' => [
[
'amount' => 50.01,
'bankAccountId' => 123,
'id' => 123,
'date' => '2022-01-04T10:20:00Z',
'salesTaxAmount' => 1.01,
'description' => 'Gas purchase',
'vendorId' => 123,
'vendorName' => 'United Airlines',
'businessId' => 123,
'clientId' => 123,
'clientName' => '<string>',
'categoryId' => 123,
'personalCategoryId' => 123,
'frequency' => 'ONE_TIME',
'isParent' => true,
'apiExpenseId' => '<string>',
'billId' => 123,
'childExpenses' => [
[
'type' => 'BUSINESS',
'amount' => 50.01,
'status' => 'ACTIVE',
'id' => 123,
'businessId' => 123,
'clientId' => 123,
'categoryId' => 123,
'personalCategoryId' => 123,
'description' => 'Gas purchase',
'salesTaxAmount' => 1.01,
'state' => 'DC',
'vendorId' => 123,
'billId' => [
]
]
],
'customData' => [
],
'bankTransferId' => 123,
'revenueId' => 123,
'taxPaymentId' => 123,
'v6EntityId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$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://sandbox.hurdlr.com/rest/v5/expenses/expenses"
payload := strings.NewReader("{\n \"expenses\": [\n {\n \"amount\": 50.01,\n \"bankAccountId\": 123,\n \"id\": 123,\n \"date\": \"2022-01-04T10:20:00Z\",\n \"salesTaxAmount\": 1.01,\n \"description\": \"Gas purchase\",\n \"vendorId\": 123,\n \"vendorName\": \"United Airlines\",\n \"businessId\": 123,\n \"clientId\": 123,\n \"clientName\": \"<string>\",\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"frequency\": \"ONE_TIME\",\n \"isParent\": true,\n \"apiExpenseId\": \"<string>\",\n \"billId\": 123,\n \"childExpenses\": [\n {\n \"type\": \"BUSINESS\",\n \"amount\": 50.01,\n \"status\": \"ACTIVE\",\n \"id\": 123,\n \"businessId\": 123,\n \"clientId\": 123,\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"description\": \"Gas purchase\",\n \"salesTaxAmount\": 1.01,\n \"state\": \"DC\",\n \"vendorId\": 123,\n \"billId\": {}\n }\n ],\n \"customData\": {},\n \"bankTransferId\": 123,\n \"revenueId\": 123,\n \"taxPaymentId\": 123,\n \"v6EntityId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/expenses/expenses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"expenses\": [\n {\n \"amount\": 50.01,\n \"bankAccountId\": 123,\n \"id\": 123,\n \"date\": \"2022-01-04T10:20:00Z\",\n \"salesTaxAmount\": 1.01,\n \"description\": \"Gas purchase\",\n \"vendorId\": 123,\n \"vendorName\": \"United Airlines\",\n \"businessId\": 123,\n \"clientId\": 123,\n \"clientName\": \"<string>\",\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"frequency\": \"ONE_TIME\",\n \"isParent\": true,\n \"apiExpenseId\": \"<string>\",\n \"billId\": 123,\n \"childExpenses\": [\n {\n \"type\": \"BUSINESS\",\n \"amount\": 50.01,\n \"status\": \"ACTIVE\",\n \"id\": 123,\n \"businessId\": 123,\n \"clientId\": 123,\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"description\": \"Gas purchase\",\n \"salesTaxAmount\": 1.01,\n \"state\": \"DC\",\n \"vendorId\": 123,\n \"billId\": {}\n }\n ],\n \"customData\": {},\n \"bankTransferId\": 123,\n \"revenueId\": 123,\n \"taxPaymentId\": 123,\n \"v6EntityId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/expenses/expenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"expenses\": [\n {\n \"amount\": 50.01,\n \"bankAccountId\": 123,\n \"id\": 123,\n \"date\": \"2022-01-04T10:20:00Z\",\n \"salesTaxAmount\": 1.01,\n \"description\": \"Gas purchase\",\n \"vendorId\": 123,\n \"vendorName\": \"United Airlines\",\n \"businessId\": 123,\n \"clientId\": 123,\n \"clientName\": \"<string>\",\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"frequency\": \"ONE_TIME\",\n \"isParent\": true,\n \"apiExpenseId\": \"<string>\",\n \"billId\": 123,\n \"childExpenses\": [\n {\n \"type\": \"BUSINESS\",\n \"amount\": 50.01,\n \"status\": \"ACTIVE\",\n \"id\": 123,\n \"businessId\": 123,\n \"clientId\": 123,\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"description\": \"Gas purchase\",\n \"salesTaxAmount\": 1.01,\n \"state\": \"DC\",\n \"vendorId\": 123,\n \"billId\": {}\n }\n ],\n \"customData\": {},\n \"bankTransferId\": 123,\n \"revenueId\": 123,\n \"taxPaymentId\": 123,\n \"v6EntityId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"errors": {
"fieldErrors": {},
"globalErrors": [
{
"errorMessage": "<string>"
}
]
},
"id": "<string>",
"webhook": {
"userId": "<string>",
"accountantUserId": "<string>"
}
}
]Expenses
Save expenses
Save a new (or update an existing) set of expenses
POST
/
v5
/
expenses
/
expenses
Save expenses
curl --request POST \
--url https://sandbox.hurdlr.com/rest/v5/expenses/expenses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: */*' \
--data '
{
"expenses": [
{
"amount": 50.01,
"bankAccountId": 123,
"id": 123,
"date": "2022-01-04T10:20:00Z",
"salesTaxAmount": 1.01,
"description": "Gas purchase",
"vendorId": 123,
"vendorName": "United Airlines",
"businessId": 123,
"clientId": 123,
"clientName": "<string>",
"categoryId": 123,
"personalCategoryId": 123,
"frequency": "ONE_TIME",
"isParent": true,
"apiExpenseId": "<string>",
"billId": 123,
"childExpenses": [
{
"type": "BUSINESS",
"amount": 50.01,
"status": "ACTIVE",
"id": 123,
"businessId": 123,
"clientId": 123,
"categoryId": 123,
"personalCategoryId": 123,
"description": "Gas purchase",
"salesTaxAmount": 1.01,
"state": "DC",
"vendorId": 123,
"billId": {}
}
],
"customData": {},
"bankTransferId": 123,
"revenueId": 123,
"taxPaymentId": 123,
"v6EntityId": "<string>"
}
]
}
'import requests
url = "https://sandbox.hurdlr.com/rest/v5/expenses/expenses"
payload = { "expenses": [
{
"amount": 50.01,
"bankAccountId": 123,
"id": 123,
"date": "2022-01-04T10:20:00Z",
"salesTaxAmount": 1.01,
"description": "Gas purchase",
"vendorId": 123,
"vendorName": "United Airlines",
"businessId": 123,
"clientId": 123,
"clientName": "<string>",
"categoryId": 123,
"personalCategoryId": 123,
"frequency": "ONE_TIME",
"isParent": True,
"apiExpenseId": "<string>",
"billId": 123,
"childExpenses": [
{
"type": "BUSINESS",
"amount": 50.01,
"status": "ACTIVE",
"id": 123,
"businessId": 123,
"clientId": 123,
"categoryId": 123,
"personalCategoryId": 123,
"description": "Gas purchase",
"salesTaxAmount": 1.01,
"state": "DC",
"vendorId": 123,
"billId": {}
}
],
"customData": {},
"bankTransferId": 123,
"revenueId": 123,
"taxPaymentId": 123,
"v6EntityId": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "*/*"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': '*/*'},
body: JSON.stringify({
expenses: [
{
amount: 50.01,
bankAccountId: 123,
id: 123,
date: '2022-01-04T10:20:00Z',
salesTaxAmount: 1.01,
description: 'Gas purchase',
vendorId: 123,
vendorName: 'United Airlines',
businessId: 123,
clientId: 123,
clientName: '<string>',
categoryId: 123,
personalCategoryId: 123,
frequency: 'ONE_TIME',
isParent: true,
apiExpenseId: '<string>',
billId: 123,
childExpenses: [
{
type: 'BUSINESS',
amount: 50.01,
status: 'ACTIVE',
id: 123,
businessId: 123,
clientId: 123,
categoryId: 123,
personalCategoryId: 123,
description: 'Gas purchase',
salesTaxAmount: 1.01,
state: 'DC',
vendorId: 123,
billId: {}
}
],
customData: {},
bankTransferId: 123,
revenueId: 123,
taxPaymentId: 123,
v6EntityId: '<string>'
}
]
})
};
fetch('https://sandbox.hurdlr.com/rest/v5/expenses/expenses', 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://sandbox.hurdlr.com/rest/v5/expenses/expenses",
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([
'expenses' => [
[
'amount' => 50.01,
'bankAccountId' => 123,
'id' => 123,
'date' => '2022-01-04T10:20:00Z',
'salesTaxAmount' => 1.01,
'description' => 'Gas purchase',
'vendorId' => 123,
'vendorName' => 'United Airlines',
'businessId' => 123,
'clientId' => 123,
'clientName' => '<string>',
'categoryId' => 123,
'personalCategoryId' => 123,
'frequency' => 'ONE_TIME',
'isParent' => true,
'apiExpenseId' => '<string>',
'billId' => 123,
'childExpenses' => [
[
'type' => 'BUSINESS',
'amount' => 50.01,
'status' => 'ACTIVE',
'id' => 123,
'businessId' => 123,
'clientId' => 123,
'categoryId' => 123,
'personalCategoryId' => 123,
'description' => 'Gas purchase',
'salesTaxAmount' => 1.01,
'state' => 'DC',
'vendorId' => 123,
'billId' => [
]
]
],
'customData' => [
],
'bankTransferId' => 123,
'revenueId' => 123,
'taxPaymentId' => 123,
'v6EntityId' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: */*"
],
]);
$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://sandbox.hurdlr.com/rest/v5/expenses/expenses"
payload := strings.NewReader("{\n \"expenses\": [\n {\n \"amount\": 50.01,\n \"bankAccountId\": 123,\n \"id\": 123,\n \"date\": \"2022-01-04T10:20:00Z\",\n \"salesTaxAmount\": 1.01,\n \"description\": \"Gas purchase\",\n \"vendorId\": 123,\n \"vendorName\": \"United Airlines\",\n \"businessId\": 123,\n \"clientId\": 123,\n \"clientName\": \"<string>\",\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"frequency\": \"ONE_TIME\",\n \"isParent\": true,\n \"apiExpenseId\": \"<string>\",\n \"billId\": 123,\n \"childExpenses\": [\n {\n \"type\": \"BUSINESS\",\n \"amount\": 50.01,\n \"status\": \"ACTIVE\",\n \"id\": 123,\n \"businessId\": 123,\n \"clientId\": 123,\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"description\": \"Gas purchase\",\n \"salesTaxAmount\": 1.01,\n \"state\": \"DC\",\n \"vendorId\": 123,\n \"billId\": {}\n }\n ],\n \"customData\": {},\n \"bankTransferId\": 123,\n \"revenueId\": 123,\n \"taxPaymentId\": 123,\n \"v6EntityId\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "*/*")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hurdlr.com/rest/v5/expenses/expenses")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "*/*")
.body("{\n \"expenses\": [\n {\n \"amount\": 50.01,\n \"bankAccountId\": 123,\n \"id\": 123,\n \"date\": \"2022-01-04T10:20:00Z\",\n \"salesTaxAmount\": 1.01,\n \"description\": \"Gas purchase\",\n \"vendorId\": 123,\n \"vendorName\": \"United Airlines\",\n \"businessId\": 123,\n \"clientId\": 123,\n \"clientName\": \"<string>\",\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"frequency\": \"ONE_TIME\",\n \"isParent\": true,\n \"apiExpenseId\": \"<string>\",\n \"billId\": 123,\n \"childExpenses\": [\n {\n \"type\": \"BUSINESS\",\n \"amount\": 50.01,\n \"status\": \"ACTIVE\",\n \"id\": 123,\n \"businessId\": 123,\n \"clientId\": 123,\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"description\": \"Gas purchase\",\n \"salesTaxAmount\": 1.01,\n \"state\": \"DC\",\n \"vendorId\": 123,\n \"billId\": {}\n }\n ],\n \"customData\": {},\n \"bankTransferId\": 123,\n \"revenueId\": 123,\n \"taxPaymentId\": 123,\n \"v6EntityId\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hurdlr.com/rest/v5/expenses/expenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = '*/*'
request.body = "{\n \"expenses\": [\n {\n \"amount\": 50.01,\n \"bankAccountId\": 123,\n \"id\": 123,\n \"date\": \"2022-01-04T10:20:00Z\",\n \"salesTaxAmount\": 1.01,\n \"description\": \"Gas purchase\",\n \"vendorId\": 123,\n \"vendorName\": \"United Airlines\",\n \"businessId\": 123,\n \"clientId\": 123,\n \"clientName\": \"<string>\",\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"frequency\": \"ONE_TIME\",\n \"isParent\": true,\n \"apiExpenseId\": \"<string>\",\n \"billId\": 123,\n \"childExpenses\": [\n {\n \"type\": \"BUSINESS\",\n \"amount\": 50.01,\n \"status\": \"ACTIVE\",\n \"id\": 123,\n \"businessId\": 123,\n \"clientId\": 123,\n \"categoryId\": 123,\n \"personalCategoryId\": 123,\n \"description\": \"Gas purchase\",\n \"salesTaxAmount\": 1.01,\n \"state\": \"DC\",\n \"vendorId\": 123,\n \"billId\": {}\n }\n ],\n \"customData\": {},\n \"bankTransferId\": 123,\n \"revenueId\": 123,\n \"taxPaymentId\": 123,\n \"v6EntityId\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"errors": {
"fieldErrors": {},
"globalErrors": [
{
"errorMessage": "<string>"
}
]
},
"id": "<string>",
"webhook": {
"userId": "<string>",
"accountantUserId": "<string>"
}
}
]Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
*/*
expenses object
Show child attributes
Show child attributes
Response
200 - application/json
Successful operation
⌘I