List reimbursements
curl --request GET \
--url https://api.usehammock.co/reimbursements \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usehammock.co/reimbursements"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usehammock.co/reimbursements', 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.usehammock.co/reimbursements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usehammock.co/reimbursements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usehammock.co/reimbursements")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usehammock.co/reimbursements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "reimb_8Wq3Zr6tHy1D",
"object": "reimbursement",
"employer": "empr_1Qx8Zt2eZvKYlo2C",
"employee": "emp_5Tg7Rw2nBx8P",
"benefit": "ben_1Zx5Cv9bNm3Q",
"benefit_type": "hsa",
"amount": 12500,
"currency": "usd",
"tax_treatment": "taxable",
"status": "pending",
"livemode": true,
"created": "2023-11-07T05:31:56Z",
"payroll": "pay_6Mn2Bv8cXz4L",
"paid_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"url": "/reimbursements"
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "Missing required parameter: employer.",
"param": "employer",
"doc_url": "https://docs.usehammock.co/api/errors#parameter_missing",
"request_id": "req_9Kd2Lm5nPq8R"
}
}Reimbursements
List reimbursements
List pending reimbursements before you finalize a payroll, pay them, then name them in the payroll you report.
GET
/
reimbursements
List reimbursements
curl --request GET \
--url https://api.usehammock.co/reimbursements \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usehammock.co/reimbursements"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.usehammock.co/reimbursements', 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.usehammock.co/reimbursements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.usehammock.co/reimbursements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.usehammock.co/reimbursements")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usehammock.co/reimbursements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"id": "reimb_8Wq3Zr6tHy1D",
"object": "reimbursement",
"employer": "empr_1Qx8Zt2eZvKYlo2C",
"employee": "emp_5Tg7Rw2nBx8P",
"benefit": "ben_1Zx5Cv9bNm3Q",
"benefit_type": "hsa",
"amount": 12500,
"currency": "usd",
"tax_treatment": "taxable",
"status": "pending",
"livemode": true,
"created": "2023-11-07T05:31:56Z",
"payroll": "pay_6Mn2Bv8cXz4L",
"paid_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"url": "/reimbursements"
}{
"error": {
"type": "invalid_request_error",
"code": "parameter_missing",
"message": "Missing required parameter: employer.",
"param": "employer",
"doc_url": "https://docs.usehammock.co/api/errors#parameter_missing",
"request_id": "req_9Kd2Lm5nPq8R"
}
}