Delete Allocation
curl --request DELETE \
--url https://planner.svc.v2.projectcor.com/allocation/removeAllocation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": 1111,
"companyId": 111,
"resource": {
"typeId": "Project",
"entityId": 1111
},
"from": "2024-01-01",
"to": "2024-03-31",
"assignedByUserId": 11111,
"allocatedHours": 20
}
'import requests
url = "https://planner.svc.v2.projectcor.com/allocation/removeAllocation"
payload = {
"userId": 1111,
"companyId": 111,
"resource": {
"typeId": "Project",
"entityId": 1111
},
"from": "2024-01-01",
"to": "2024-03-31",
"assignedByUserId": 11111,
"allocatedHours": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: 1111,
companyId: 111,
resource: {typeId: 'Project', entityId: 1111},
from: '2024-01-01',
to: '2024-03-31',
assignedByUserId: 11111,
allocatedHours: 20
})
};
fetch('https://planner.svc.v2.projectcor.com/allocation/removeAllocation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://planner.svc.v2.projectcor.com/allocation/removeAllocation';
const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: 1111,
companyId: 111,
resource: {typeId: 'Project', entityId: 1111},
from: '2024-01-01',
to: '2024-03-31',
assignedByUserId: 11111,
allocatedHours: 20
})
};
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://planner.svc.v2.projectcor.com/allocation/removeAllocation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'userId' => 1111,
'companyId' => 111,
'resource' => [
'typeId' => 'Project',
'entityId' => 1111
],
'from' => '2024-01-01',
'to' => '2024-03-31',
'assignedByUserId' => 11111,
'allocatedHours' => 20
]),
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://planner.svc.v2.projectcor.com/allocation/removeAllocation"
payload := strings.NewReader("{\n \"userId\": 1111,\n \"companyId\": 111,\n \"resource\": {\n \"typeId\": \"Project\",\n \"entityId\": 1111\n },\n \"from\": \"2024-01-01\",\n \"to\": \"2024-03-31\",\n \"assignedByUserId\": 11111,\n \"allocatedHours\": 20\n}")
req, _ := http.NewRequest("DELETE", 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))
}{
"error": "AllocationNotFoundError",
"message": "The specified allocation cannot be found"
}Allocations
Delete Allocation
Removes an existing resource allocation.
Request Body Requirements: All values in the object are required.
Known Errors:
AllocationNotFoundError— The specified allocation cannot be foundProjectNotFoundError— The specified project cannot be found
Please ensure that your request is valid and all specified resources exist to avoid these errors.
DELETE
/
allocation
/
removeAllocation
Delete Allocation
curl --request DELETE \
--url https://planner.svc.v2.projectcor.com/allocation/removeAllocation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"userId": 1111,
"companyId": 111,
"resource": {
"typeId": "Project",
"entityId": 1111
},
"from": "2024-01-01",
"to": "2024-03-31",
"assignedByUserId": 11111,
"allocatedHours": 20
}
'import requests
url = "https://planner.svc.v2.projectcor.com/allocation/removeAllocation"
payload = {
"userId": 1111,
"companyId": 111,
"resource": {
"typeId": "Project",
"entityId": 1111
},
"from": "2024-01-01",
"to": "2024-03-31",
"assignedByUserId": 11111,
"allocatedHours": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: 1111,
companyId: 111,
resource: {typeId: 'Project', entityId: 1111},
from: '2024-01-01',
to: '2024-03-31',
assignedByUserId: 11111,
allocatedHours: 20
})
};
fetch('https://planner.svc.v2.projectcor.com/allocation/removeAllocation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://planner.svc.v2.projectcor.com/allocation/removeAllocation';
const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
userId: 1111,
companyId: 111,
resource: {typeId: 'Project', entityId: 1111},
from: '2024-01-01',
to: '2024-03-31',
assignedByUserId: 11111,
allocatedHours: 20
})
};
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://planner.svc.v2.projectcor.com/allocation/removeAllocation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'userId' => 1111,
'companyId' => 111,
'resource' => [
'typeId' => 'Project',
'entityId' => 1111
],
'from' => '2024-01-01',
'to' => '2024-03-31',
'assignedByUserId' => 11111,
'allocatedHours' => 20
]),
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://planner.svc.v2.projectcor.com/allocation/removeAllocation"
payload := strings.NewReader("{\n \"userId\": 1111,\n \"companyId\": 111,\n \"resource\": {\n \"typeId\": \"Project\",\n \"entityId\": 1111\n },\n \"from\": \"2024-01-01\",\n \"to\": \"2024-03-31\",\n \"assignedByUserId\": 11111,\n \"allocatedHours\": 20\n}")
req, _ := http.NewRequest("DELETE", 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))
}{
"error": "AllocationNotFoundError",
"message": "The specified allocation cannot be found"
}Authorizations
Uses the same authentication as the main COR API. Obtain a token from https://api.projectcor.com/v1/oauth/token
Body
application/json
ID of the user being allocated
Company ID
Show child attributes
Show child attributes
Start date (YYYY-MM-DD)
End date (YYYY-MM-DD). Must be after 'from' date and within 12 months.
ID of the user who assigned the allocation
Number of hours allocated
User email (optional)
Response
Allocation deleted successfully
Was this page helpful?
⌘I

