cURL
curl --request POST \
--url https://api.example.com/{connector_id}/list_expenses \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"filters": {
"transaction_date": {
"start_date": "<string>",
"end_date": "<string>"
}
}
},
"include_raw_data": true,
"page": {
"token": "<string>",
"size": 123
},
"settings": {},
"auth": {
"id": "some_unique_id"
},
"credentials": [
{
"id": "some_unique_id"
}
]
}
'import requests
url = "https://api.example.com/{connector_id}/list_expenses"
payload = {
"request": { "filters": { "transaction_date": {
"start_date": "<string>",
"end_date": "<string>"
} } },
"include_raw_data": True,
"page": {
"token": "<string>",
"size": 123
},
"settings": {},
"auth": { "id": "some_unique_id" },
"credentials": [{ "id": "some_unique_id" }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request: {filters: {transaction_date: {start_date: '<string>', end_date: '<string>'}}},
include_raw_data: true,
page: {token: '<string>', size: 123},
settings: {},
auth: {id: 'some_unique_id'},
credentials: [{id: 'some_unique_id'}]
})
};
fetch('https://api.example.com/{connector_id}/list_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://api.example.com/{connector_id}/list_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([
'request' => [
'filters' => [
'transaction_date' => [
'start_date' => '<string>',
'end_date' => '<string>'
]
]
],
'include_raw_data' => true,
'page' => [
'token' => '<string>',
'size' => 123
],
'settings' => [
],
'auth' => [
'id' => 'some_unique_id'
],
'credentials' => [
[
'id' => 'some_unique_id'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/{connector_id}/list_expenses"
payload := strings.NewReader("{\n \"request\": {\n \"filters\": {\n \"transaction_date\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\"\n }\n }\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {},\n \"auth\": {\n \"id\": \"some_unique_id\"\n },\n \"credentials\": [\n {\n \"id\": \"some_unique_id\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/{connector_id}/list_expenses")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"filters\": {\n \"transaction_date\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\"\n }\n }\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {},\n \"auth\": {\n \"id\": \"some_unique_id\"\n },\n \"credentials\": [\n {\n \"id\": \"some_unique_id\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{connector_id}/list_expenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": {\n \"filters\": {\n \"transaction_date\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\"\n }\n }\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {},\n \"auth\": {\n \"id\": \"some_unique_id\"\n },\n \"credentials\": [\n {\n \"id\": \"some_unique_id\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"id": "2652b217-d686-4277-aad5-37320e9d9912",
"report_id": "bfc896e8-4bca-4aa4-87df-6341b22ed44d",
"transaction_date": "2024-01-01T:00:00+00:00",
"payment_date": "2024-01-03T:00:00+00:00",
"total_amount": {
"amount": "100.00",
"currency": "USD"
},
"paid_amount": {
"amount": "100.00",
"currency": "USD"
},
"seller": {
"id": "f2d8d6a7-1a1a-4b3d-a092-936a7b32a0b3",
"name": "Adobe",
"description": "A leading software company known for its creativity products"
},
"description": "Creative Cloud for the Marketing team",
"submitter": {
"id": "6da0e939-9ba9-497c-bf05-a86e95cbbb49",
"email": "harry@hogwarts.edu"
},
"type": "reimbursement",
"approval_status": {
"display_value": "Approved",
"normalized_value": "approved"
},
"payment_status": {
"display_value": "Paid",
"normalized_value": "paid"
}
}
],
"raw_data": "<unknown>",
"page": {
"token": "<string>",
"size": 123
}
}Read Capabilities
/{connector_id}/list_expenses
Retrieve a list of reimbursements and/or card transactions
Common use cases include:
- Tracking overall software spend
- Identifying “rogue” employee spend
POST
/
{connector_id}
/
list_expenses
cURL
curl --request POST \
--url https://api.example.com/{connector_id}/list_expenses \
--header 'Content-Type: application/json' \
--data '
{
"request": {
"filters": {
"transaction_date": {
"start_date": "<string>",
"end_date": "<string>"
}
}
},
"include_raw_data": true,
"page": {
"token": "<string>",
"size": 123
},
"settings": {},
"auth": {
"id": "some_unique_id"
},
"credentials": [
{
"id": "some_unique_id"
}
]
}
'import requests
url = "https://api.example.com/{connector_id}/list_expenses"
payload = {
"request": { "filters": { "transaction_date": {
"start_date": "<string>",
"end_date": "<string>"
} } },
"include_raw_data": True,
"page": {
"token": "<string>",
"size": 123
},
"settings": {},
"auth": { "id": "some_unique_id" },
"credentials": [{ "id": "some_unique_id" }]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request: {filters: {transaction_date: {start_date: '<string>', end_date: '<string>'}}},
include_raw_data: true,
page: {token: '<string>', size: 123},
settings: {},
auth: {id: 'some_unique_id'},
credentials: [{id: 'some_unique_id'}]
})
};
fetch('https://api.example.com/{connector_id}/list_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://api.example.com/{connector_id}/list_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([
'request' => [
'filters' => [
'transaction_date' => [
'start_date' => '<string>',
'end_date' => '<string>'
]
]
],
'include_raw_data' => true,
'page' => [
'token' => '<string>',
'size' => 123
],
'settings' => [
],
'auth' => [
'id' => 'some_unique_id'
],
'credentials' => [
[
'id' => 'some_unique_id'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/{connector_id}/list_expenses"
payload := strings.NewReader("{\n \"request\": {\n \"filters\": {\n \"transaction_date\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\"\n }\n }\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {},\n \"auth\": {\n \"id\": \"some_unique_id\"\n },\n \"credentials\": [\n {\n \"id\": \"some_unique_id\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/{connector_id}/list_expenses")
.header("Content-Type", "application/json")
.body("{\n \"request\": {\n \"filters\": {\n \"transaction_date\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\"\n }\n }\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {},\n \"auth\": {\n \"id\": \"some_unique_id\"\n },\n \"credentials\": [\n {\n \"id\": \"some_unique_id\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{connector_id}/list_expenses")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request\": {\n \"filters\": {\n \"transaction_date\": {\n \"start_date\": \"<string>\",\n \"end_date\": \"<string>\"\n }\n }\n },\n \"include_raw_data\": true,\n \"page\": {\n \"token\": \"<string>\",\n \"size\": 123\n },\n \"settings\": {},\n \"auth\": {\n \"id\": \"some_unique_id\"\n },\n \"credentials\": [\n {\n \"id\": \"some_unique_id\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": [
{
"id": "2652b217-d686-4277-aad5-37320e9d9912",
"report_id": "bfc896e8-4bca-4aa4-87df-6341b22ed44d",
"transaction_date": "2024-01-01T:00:00+00:00",
"payment_date": "2024-01-03T:00:00+00:00",
"total_amount": {
"amount": "100.00",
"currency": "USD"
},
"paid_amount": {
"amount": "100.00",
"currency": "USD"
},
"seller": {
"id": "f2d8d6a7-1a1a-4b3d-a092-936a7b32a0b3",
"name": "Adobe",
"description": "A leading software company known for its creativity products"
},
"description": "Creative Cloud for the Marketing team",
"submitter": {
"id": "6da0e939-9ba9-497c-bf05-a86e95cbbb49",
"email": "harry@hogwarts.edu"
},
"type": "reimbursement",
"approval_status": {
"display_value": "Approved",
"normalized_value": "approved"
},
"payment_status": {
"display_value": "Paid",
"normalized_value": "paid"
}
}
],
"raw_data": "<unknown>",
"page": {
"token": "<string>",
"size": 123
}
}Path Parameters
Body
application/json
Authenticated request.
The main request payload.
Show child attributes
Show child attributes
Whether to include raw data in the response.
Pagination information for the request.
Show child attributes
Show child attributes
Connector-specific settings for the request.
These are settings that are shared across all capabilities.
Usually contain additional required configuration options not specified by the capability schema.
Show child attributes
Show child attributes
The authentication credentials for the request.
Show child attributes
Show child attributes
Show child attributes
Show child attributes