Contractor Payments
Get Contractor Payments
Retrieve a contractor payment by contractorPaymentID, or list payments for a company, optionally filtered by contractorID.
GET
/
contractorPayment
Get Contractor Payments
curl --request GET \
--url https://api.zeal.com/contractorPayment \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeal.com/contractorPayment"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeal.com/contractorPayment', 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.zeal.com/contractorPayment",
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: <api-key>"
],
]);
$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.zeal.com/contractorPayment"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.zeal.com/contractorPayment")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/contractorPayment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"contractorPaymentID": "24ce6cb4144bac8a33e13223b2b462",
"status": "pending",
"disbursement_status": "pending",
"first_name": "erlich",
"middle_name": "null",
"last_name": "bachman",
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"contractorID": "cbce6cc414403c8a33e43223bbb469",
"approval_required": false,
"approved": false,
"pay_date": "2023-10-01",
"amount": 100,
"triggered": false,
"triggered_at": null,
"customerAccountID": null,
"metadata": {
"example": "example"
}
}
],
"meta": {
"next": "https://api.zeal.com/contractorPayment?startAt=24ce6cb4144bac8a33e13223b2b4b&limit=10",
"previous": null
}
}This endpoint serves two usages on the same path. Pass
companyID and contractorPaymentID to retrieve a single contractor payment. Omit contractorPaymentID to list payments for a company; you can optionally pass contractorID (and status or paymentGroupID) to filter that list.
When contractorPaymentID is present, list filters such as contractorID are ignored.
Returns
Returns response status and the contractor payment (or a paginated list of contractor payments).| attribute | type | description |
|---|---|---|
| success | boolean | Response status |
| data | object or array | Contractor Payment object, or an array of contractor payments when listing |
| errors | array | If success is false, errors contains a list of error objects: message (string, error message), status (number, HTTP response code), code (number, error code - see Error codes) |
Authorizations
Query Parameters
Company ID of the employer
ID of the contractor payment to retrieve. When present, the endpoint returns that single payment and list filters (contractorID, status, paymentGroupID) are ignored.
When listing payments (omit contractorPaymentID), filter to this contractor. Ignored when contractorPaymentID is present.
Filter by status of contractor payment. Provide one of the following statuses: pending, pre-processed, processed
Available options:
pending, pre-processed, processed Filter by contractor payment group
The pagination cursor to start at
Limit the amount of data returned
Response
200
⌘I
Get Contractor Payments
curl --request GET \
--url https://api.zeal.com/contractorPayment \
--header 'Authorization: <api-key>'import requests
url = "https://api.zeal.com/contractorPayment"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.zeal.com/contractorPayment', 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.zeal.com/contractorPayment",
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: <api-key>"
],
]);
$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.zeal.com/contractorPayment"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.zeal.com/contractorPayment")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/contractorPayment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": [
{
"contractorPaymentID": "24ce6cb4144bac8a33e13223b2b462",
"status": "pending",
"disbursement_status": "pending",
"first_name": "erlich",
"middle_name": "null",
"last_name": "bachman",
"companyID": "fcce6cc41440ac8a33e13223bbb462",
"contractorID": "cbce6cc414403c8a33e43223bbb469",
"approval_required": false,
"approved": false,
"pay_date": "2023-10-01",
"amount": 100,
"triggered": false,
"triggered_at": null,
"customerAccountID": null,
"metadata": {
"example": "example"
}
}
],
"meta": {
"next": "https://api.zeal.com/contractorPayment?startAt=24ce6cb4144bac8a33e13223b2b4b&limit=10",
"previous": null
}
}