Retrieve an employer
curl --request GET \
--url https://api.usehammock.co/employers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usehammock.co/employers/{id}"
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/employers/{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.usehammock.co/employers/{id}",
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/employers/{id}"
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/employers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usehammock.co/employers/{id}")
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{
"id": "empr_1Qx8Zt2eZvKYlo2C",
"object": "employer",
"name": "Acme Robotics",
"status": "onboarding",
"requirements": {
"currently_due": [
"agreements",
"bank_account"
],
"pending_verification": [
"business_verification"
],
"disabled_reason": "requirements.currently_due"
},
"metadata": {
"plan": "growth"
},
"livemode": true,
"created": "2027-02-01T15:00:00Z",
"legal_name": "Acme Robotics, Inc.",
"external_id": "company_8f2k1",
"ein_last4": "6789",
"address": {
"line1": "500 Howard St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US",
"line2": "<string>"
},
"primary_contact": {
"first_name": "Dana",
"last_name": "Whitfield",
"email": "dana@acmerobotics.example"
}
}{
"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"
}
}Employers
Retrieve an employer
GET
/
employers
/
{id}
Retrieve an employer
curl --request GET \
--url https://api.usehammock.co/employers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.usehammock.co/employers/{id}"
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/employers/{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.usehammock.co/employers/{id}",
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/employers/{id}"
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/employers/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usehammock.co/employers/{id}")
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{
"id": "empr_1Qx8Zt2eZvKYlo2C",
"object": "employer",
"name": "Acme Robotics",
"status": "onboarding",
"requirements": {
"currently_due": [
"agreements",
"bank_account"
],
"pending_verification": [
"business_verification"
],
"disabled_reason": "requirements.currently_due"
},
"metadata": {
"plan": "growth"
},
"livemode": true,
"created": "2027-02-01T15:00:00Z",
"legal_name": "Acme Robotics, Inc.",
"external_id": "company_8f2k1",
"ein_last4": "6789",
"address": {
"line1": "500 Howard St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94105",
"country": "US",
"line2": "<string>"
},
"primary_contact": {
"first_name": "Dana",
"last_name": "Whitfield",
"email": "dana@acmerobotics.example"
}
}{
"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"
}
}Authorizations
Headers
Response
The employer.
onboarding: hosted setup isn't finished. pending_review: setup is submitted and Hammock
is reviewing it. active: employees can enroll and payrolls can be reported. closed: the
employer no longer offers Hammock benefits.
Available options:
onboarding, pending_review, active, closed