Contractor Payments
Get Contractor Payments
Retrieve a contractor payment by its contractorPaymentID.
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
}
}{
"success": false,
"errors": [
{
"message": "Employee or Contractor ID is not formatted correctly",
"code": 17
}
]
}Given the Contractor Payment ID, Zeal returns information for this Contractor Payment.
Returns
Returns response status and the contractor payment.| attribute | type | description |
|---|---|---|
| success | boolean | Response status |
| data | object | Contractor Payment object |
| 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
Contractor ID of contractor
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
}
}{
"success": false,
"errors": [
{
"message": "Employee or Contractor ID is not formatted correctly",
"code": 17
}
]
}