List payrolls
curl --request GET \
--url https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls', 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.sandbox.bitwage.com/api/company/{company_id}/payrolls",
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: Basic <encoded-value>"
],
]);
$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.sandbox.bitwage.com/api/company/{company_id}/payrolls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.sandbox.bitwage.com/api/company/{company_id}/payrolls")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"payroll_id": "<string>",
"company_id": "<string>",
"external_id": "<string>",
"currency": "<string>",
"status": "created",
"created": "2023-11-07T05:31:56Z",
"datereceived": "2023-11-07T05:31:56Z",
"dateapproved": "2023-11-07T05:31:56Z",
"datereleased": "2023-11-07T05:31:56Z",
"datefulfilled": "2023-11-07T05:31:56Z",
"datecanceled": "2023-11-07T05:31:56Z",
"invoice_ids": [
"<string>"
],
"payments": [
{
"subpayroll_id": "<string>",
"received": true,
"received_at": "2023-11-07T05:31:56Z",
"released": true,
"released_at": "2023-11-07T05:31:56Z",
"fulfilled": true,
"fulfilled_at": "2023-11-07T05:31:56Z",
"receiver_user_id": "<string>",
"outputs": [
{
"input_currency": "<string>",
"output_currency": "<string>",
"volume_input_in_input_currency": 123,
"volume_output_in_output_currency": 123,
"fees": 123,
"spread": 123,
"tx_hash": "<string>"
}
]
}
]
}
],
"meta": {
"page": 123,
"total": 123,
"pages": 123,
"has_prev": true,
"has_next": true,
"prev_num": 123,
"next_num": 123,
"per_page": 123
}
}{
"request_id": "<string>",
"message": "<string>",
"code": "recipient-worker-email-already-exists",
"data": {
"retryable": true
}
}{
"request_id": "<string>",
"message": "<string>",
"schema": {
"payments": [
"Total amount of payroll must be greater than 10"
]
},
"code": "<string>"
}Company Payroll
List payrolls
List a company’s worker payrolls, newest first. Filter by external_id to
find a payroll without storing the Bitwage payroll_id. Vendor payrolls
and balance-account withdrawals are not included. Requires the
payroll.read permission group.
GET
/
api
/
company
/
{company_id}
/
payrolls
List payrolls
curl --request GET \
--url https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls', 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.sandbox.bitwage.com/api/company/{company_id}/payrolls",
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: Basic <encoded-value>"
],
]);
$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.sandbox.bitwage.com/api/company/{company_id}/payrolls"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.sandbox.bitwage.com/api/company/{company_id}/payrolls")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.bitwage.com/api/company/{company_id}/payrolls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"payroll_id": "<string>",
"company_id": "<string>",
"external_id": "<string>",
"currency": "<string>",
"status": "created",
"created": "2023-11-07T05:31:56Z",
"datereceived": "2023-11-07T05:31:56Z",
"dateapproved": "2023-11-07T05:31:56Z",
"datereleased": "2023-11-07T05:31:56Z",
"datefulfilled": "2023-11-07T05:31:56Z",
"datecanceled": "2023-11-07T05:31:56Z",
"invoice_ids": [
"<string>"
],
"payments": [
{
"subpayroll_id": "<string>",
"received": true,
"received_at": "2023-11-07T05:31:56Z",
"released": true,
"released_at": "2023-11-07T05:31:56Z",
"fulfilled": true,
"fulfilled_at": "2023-11-07T05:31:56Z",
"receiver_user_id": "<string>",
"outputs": [
{
"input_currency": "<string>",
"output_currency": "<string>",
"volume_input_in_input_currency": 123,
"volume_output_in_output_currency": 123,
"fees": 123,
"spread": 123,
"tx_hash": "<string>"
}
]
}
]
}
],
"meta": {
"page": 123,
"total": 123,
"pages": 123,
"has_prev": true,
"has_next": true,
"prev_num": 123,
"next_num": 123,
"per_page": 123
}
}{
"request_id": "<string>",
"message": "<string>",
"code": "recipient-worker-email-already-exists",
"data": {
"retryable": true
}
}{
"request_id": "<string>",
"message": "<string>",
"schema": {
"payments": [
"Total amount of payroll must be greater than 10"
]
},
"code": "<string>"
}Authorizations
api_keyoauth