Get contract positions
curl --request GET \
--url https://api.projectcor.com/v1/contracts/{contract_id}/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.projectcor.com/v1/contracts/{contract_id}/positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.projectcor.com/v1/contracts/{contract_id}/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/contracts/{contract_id}/positions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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/{contract_id}/positions",
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.projectcor.com/v1/contracts/{contract_id}/positions"
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))
}{
"total": "1",
"perPage": 20,
"page": 1,
"lastPage": 1,
"data": [
{
"id": 1,
"user_positions_header_id": 1,
"contract_id": 1,
"position_id": 1,
"team_id": 1,
"rate": 1,
"hours": 10,
"currency_id": 1,
"currency": {
"id": 1,
"name": "USD"
},
"team": {
"id": 1,
"name": "Team 1",
"workspace_id": null
},
"position": {
"id": 1,
"name": "User Position 1"
}
}
]
}Contract Positions
Get contract positions
Retrieves all positions associated with a contract.
GET
/
contracts
/
{contract_id}
/
positions
Get contract positions
curl --request GET \
--url https://api.projectcor.com/v1/contracts/{contract_id}/positions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.projectcor.com/v1/contracts/{contract_id}/positions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.projectcor.com/v1/contracts/{contract_id}/positions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.projectcor.com/v1/contracts/{contract_id}/positions';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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/{contract_id}/positions",
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.projectcor.com/v1/contracts/{contract_id}/positions"
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))
}{
"total": "1",
"perPage": 20,
"page": 1,
"lastPage": 1,
"data": [
{
"id": 1,
"user_positions_header_id": 1,
"contract_id": 1,
"position_id": 1,
"team_id": 1,
"rate": 1,
"hours": 10,
"currency_id": 1,
"currency": {
"id": 1,
"name": "USD"
},
"team": {
"id": 1,
"name": "Team 1",
"workspace_id": null
},
"position": {
"id": 1,
"name": "User Position 1"
}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Page number (default: 1). Set to false to disable pagination.
Number of items per page (default: 20).
Response
200 - application/json
List of contract positions
Paginated response for contract positions list
Was this page helpful?

