Get contracts
curl --request GET \
--url https://api.projectcor.com/v1/contracts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"with_milestones": true,
"with_ratecards": true,
"with_positions": true,
"status": "expired",
"type": "time_and_materials"
}
'import requests
url = "https://api.projectcor.com/v1/contracts"
payload = {
"with_milestones": True,
"with_ratecards": True,
"with_positions": True,
"status": "expired",
"type": "time_and_materials"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
with_milestones: true,
with_ratecards: true,
with_positions: true,
status: 'expired',
type: 'time_and_materials'
})
};
fetch('https://api.projectcor.com/v1/contracts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/contracts';
const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
with_milestones: true,
with_ratecards: true,
with_positions: true,
status: 'expired',
type: 'time_and_materials'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectcor.com/v1/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'with_milestones' => true,
'with_ratecards' => true,
'with_positions' => true,
'status' => 'expired',
'type' => 'time_and_materials'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.projectcor.com/v1/contracts"
payload := strings.NewReader("{\n \"with_milestones\": true,\n \"with_ratecards\": true,\n \"with_positions\": true,\n \"status\": \"expired\",\n \"type\": \"time_and_materials\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"total": "<string>",
"perPage": "<string>",
"page": "<string>",
"data": [
{
"id": 123,
"client_id": 123,
"json_integrations": {},
"name": "<string>",
"type": "<string>",
"source": "<string>",
"status": "<string>",
"company_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"frequency": "<string>",
"currency_id": 123,
"currency": {
"id": 123,
"name": "<string>"
},
"url": "<string>",
"url_name": "<string>",
"user_positions_header_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}Contracts
Get contracts
Retrieves a paginated list of contracts.
GET
/
contracts
Get contracts
curl --request GET \
--url https://api.projectcor.com/v1/contracts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"with_milestones": true,
"with_ratecards": true,
"with_positions": true,
"status": "expired",
"type": "time_and_materials"
}
'import requests
url = "https://api.projectcor.com/v1/contracts"
payload = {
"with_milestones": True,
"with_ratecards": True,
"with_positions": True,
"status": "expired",
"type": "time_and_materials"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.get(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
with_milestones: true,
with_ratecards: true,
with_positions: true,
status: 'expired',
type: 'time_and_materials'
})
};
fetch('https://api.projectcor.com/v1/contracts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/contracts';
const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
with_milestones: true,
with_ratecards: true,
with_positions: true,
status: 'expired',
type: 'time_and_materials'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.projectcor.com/v1/contracts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_POSTFIELDS => json_encode([
'with_milestones' => true,
'with_ratecards' => true,
'with_positions' => true,
'status' => 'expired',
'type' => 'time_and_materials'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.projectcor.com/v1/contracts"
payload := strings.NewReader("{\n \"with_milestones\": true,\n \"with_ratecards\": true,\n \"with_positions\": true,\n \"status\": \"expired\",\n \"type\": \"time_and_materials\"\n}")
req, _ := http.NewRequest("GET", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"total": "<string>",
"perPage": "<string>",
"page": "<string>",
"data": [
{
"id": 123,
"client_id": 123,
"json_integrations": {},
"name": "<string>",
"type": "<string>",
"source": "<string>",
"status": "<string>",
"company_id": 123,
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"frequency": "<string>",
"currency_id": 123,
"currency": {
"id": 123,
"name": "<string>"
},
"url": "<string>",
"url_name": "<string>",
"user_positions_header_id": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page number (default: 1). Set to false to disable pagination.
Number of items per page (default: 20).
URL-encoded JSON object with filter criteria.
Body
application/json
Include milestones in each contract response.
Include ratecards in each contract response.
Include contract positions in each contract response.
Filter contracts by status.
Example:
"expired"
Filter contracts by type.
Example:
"time_and_materials"
Was this page helpful?
⌘I

