Skip to main content
POST
/
v2
/
integrations
/
contracts
/
{id}
/
users
curl --location 'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345/users' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "metadata": {
    "source": "GLOBANT"
  },
  "users": [
    {
      "id": "{{external_user_id}}",
      "dates": [
        { "start": "2027-10-01", "end": "2028-11-01" },
        { "start": "2025-10-10" }
      ]
    },
    {
      "id": "external-user-id-5",
      "dates": [
        { "start": "2025-10-02", "end": "2026-11-01" }
      ]
    }
  ]
}'
{
  "status": "partial_success",
  "company_id": 2336,
  "contract_id": "external-contract-id-1",
  "records_received": 2,
  "records_created": 1,
  "records_rejected": 1,
  "assigned": [
    {
      "id": 18,
      "user_id": 48915,
      "start_date": "2027-10-01T00:00:00.000Z",
      "end_date": "2028-11-01T00:00:00.000Z"
    }
  ],
  "errors": [
    {
      "id": "external-user-id-5",
      "error_code": "CE001",
      "message": "User not found in associations"
    },
    {
      "id": "external_user_id_12312333333333",
      "dates": [
        {
          "start": "2025-10-10",
          "end": null,
          "message": "Date malformatted. Start and end date are required"
        }
      ],
      "message": "Partial success. Some dates were rejected"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developers.projectcor.com/llms.txt

Use this file to discover all available pages before exploring further.

Associates one or more users with an existing contract. After the refactor, each user must be sent as an object with id and a non-empty dates array. The endpoint supports partial processing (partial_success): valid assignments are attached while rejected users or rejected date ranges are returned in errors.

Path Parameters

id
string
required
External contract ID

Request Body Requirements

metadata
object
required
users
array
required
Array of users to attach. Each item must include an external id and at least one date range in dates.

Known Errors

  • ContractNotFoundError — No contract found with the specified external ID
  • ValidationError — Missing required fields, invalid users schema, or empty dates array for any user
  • CE001 — User association not found in COR (error_code: USER_ASSOCIATION_NOT_FOUND)
  • UnprocessableEntity (422) — Upstream attach validation errors are returned in the endpoint response body
  • Partial success date validation — A user can be partially attached while one or more date ranges are rejected (message: "Partial success. Some dates were rejected")
curl --location 'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345/users' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "metadata": {
    "source": "GLOBANT"
  },
  "users": [
    {
      "id": "{{external_user_id}}",
      "dates": [
        { "start": "2027-10-01", "end": "2028-11-01" },
        { "start": "2025-10-10" }
      ]
    },
    {
      "id": "external-user-id-5",
      "dates": [
        { "start": "2025-10-02", "end": "2026-11-01" }
      ]
    }
  ]
}'
{
  "status": "partial_success",
  "company_id": 2336,
  "contract_id": "external-contract-id-1",
  "records_received": 2,
  "records_created": 1,
  "records_rejected": 1,
  "assigned": [
    {
      "id": 18,
      "user_id": 48915,
      "start_date": "2027-10-01T00:00:00.000Z",
      "end_date": "2028-11-01T00:00:00.000Z"
    }
  ],
  "errors": [
    {
      "id": "external-user-id-5",
      "error_code": "CE001",
      "message": "User not found in associations"
    },
    {
      "id": "external_user_id_12312333333333",
      "dates": [
        {
          "start": "2025-10-10",
          "end": null,
          "message": "Date malformatted. Start and end date are required"
        }
      ],
      "message": "Partial success. Some dates were rejected"
    }
  ]
}