Skip to main content
PUT
/
allocation
/
updateAllocation
Update Allocation
curl --request PUT \
  --url https://planner.svc.v2.projectcor.com/allocation/updateAllocation \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "oldAllocation": {
    "userId": 1111,
    "companyId": 11,
    "resource": {
      "entityId": 11111,
      "typeId": "Project"
    },
    "from": "2024-01-01",
    "to": "2024-03-31",
    "assignedByUserId": 1111,
    "allocatedHours": 0
  },
  "newAllocation": {
    "userId": 1111,
    "companyId": 11,
    "resource": {
      "entityId": 11111,
      "typeId": "Project"
    },
    "from": "2024-01-01",
    "to": "2024-03-31",
    "assignedByUserId": 1111,
    "allocatedHours": 10
  }
}
'
{
  "error": "AllocationNotFoundError",
  "message": "The specified allocation cannot be found"
}

Authorizations

Authorization
string
header
required

Uses the same authentication as the main COR API. Obtain a token from https://api.projectcor.com/v1/oauth/token

Body

application/json
oldAllocation
object
required

The existing allocation to be updated

newAllocation
object
required

The new allocation data

Response

Allocation updated successfully