curl --location --request PUT 'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {
"source": "SALESFORCE"
},
"status": "completed",
"end_date": "2025-06-30",
"amount": 60000
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345"
payload = {
"metadata": {
"source": "SALESFORCE"
},
"status": "completed",
"end_date": "2025-06-30",
"amount": 60000
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
metadata: {
source: 'SALESFORCE'
},
status: 'completed',
end_date: '2025-06-30',
value: 60000
})
}
);
const data = await response.json();
console.log(data);
{
"id": 30001,
"name": "Annual Service Agreement",
"client_id": 25855,
"type": "retainer",
"status": "completed",
"start_date": "2025-01-01",
"end_date": "2025-06-30",
"amount": 60000,
"company_id": 1234,
"created_at": "2025-01-10T14:30:00Z",
"updated_at": "2025-01-15T10:00:00Z"
}
{
"status": 400,
"name": "CORCustomError",
"code": "CTR006",
"message": "Cannot save contract. Exchange rate not found for USD to ARS. Please sync exchange rates first."
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Entity is not associated"
}
Contracts
Update Contract
Updates an existing contract in your COR instance using its external ID
PUT
/
v2
/
integrations
/
contracts
/
{id}
curl --location --request PUT 'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {
"source": "SALESFORCE"
},
"status": "completed",
"end_date": "2025-06-30",
"amount": 60000
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345"
payload = {
"metadata": {
"source": "SALESFORCE"
},
"status": "completed",
"end_date": "2025-06-30",
"amount": 60000
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
metadata: {
source: 'SALESFORCE'
},
status: 'completed',
end_date: '2025-06-30',
value: 60000
})
}
);
const data = await response.json();
console.log(data);
{
"id": 30001,
"name": "Annual Service Agreement",
"client_id": 25855,
"type": "retainer",
"status": "completed",
"start_date": "2025-01-01",
"end_date": "2025-06-30",
"amount": 60000,
"company_id": 1234,
"created_at": "2025-01-10T14:30:00Z",
"updated_at": "2025-01-15T10:00:00Z"
}
{
"status": 400,
"name": "CORCustomError",
"code": "CTR006",
"message": "Cannot save contract. Exchange rate not found for USD to ARS. Please sync exchange rates first."
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Entity is not associated"
}
Updates an existing contract in your COR instance using its external ID. Performs the same validations as creation, including date validation in
YYYY-MM-DD format, and updates only the provided fields.
The currency ISO sent in the request must have a previously configured currency exchange in COR. If no exchange rate exists from the contract currency to the company base currency, contract update is rejected with status: 400, name: CORCustomError, and code: CTR006.
Path Parameters
Request Body Requirements
Non-negative decimal rounded to 2 places. Must be between
0 and 999999999999.99 (numeric(14,2)).Known Errors
ZC001— Entity is not associated (contract with the specified external ID not found)ContractNotFoundError— No contract found with the specified external IDValidationError— Missing requiredmetadata.sourcefieldValidationError—Invalid start date format: <value>whenstart_dateis not a validYYYY-MM-DDdateValidationError—Invalid end date format: <value>whenend_dateis not a validYYYY-MM-DDdateValidationError—Invalid contract amount: must be a number between 0 and 999999999999.99ValidationError—Invalid contract description: must be a string of at most 255 charactersCTR006(CORCustomError,400) —Cannot save contract. Exchange rate not found for ${currency} to ${baseCurrency}. Please sync exchange rates first.
curl --location --request PUT 'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"metadata": {
"source": "SALESFORCE"
},
"status": "completed",
"end_date": "2025-06-30",
"amount": 60000
}'
import requests
url = "https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345"
payload = {
"metadata": {
"source": "SALESFORCE"
},
"status": "completed",
"end_date": "2025-06-30",
"amount": 60000
}
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
const response = await fetch(
'https://integrations.projectcor.com/v2/integrations/contracts/SF-CONTRACT-12345',
{
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
metadata: {
source: 'SALESFORCE'
},
status: 'completed',
end_date: '2025-06-30',
value: 60000
})
}
);
const data = await response.json();
console.log(data);
{
"id": 30001,
"name": "Annual Service Agreement",
"client_id": 25855,
"type": "retainer",
"status": "completed",
"start_date": "2025-01-01",
"end_date": "2025-06-30",
"amount": 60000,
"company_id": 1234,
"created_at": "2025-01-10T14:30:00Z",
"updated_at": "2025-01-15T10:00:00Z"
}
{
"status": 400,
"name": "CORCustomError",
"code": "CTR006",
"message": "Cannot save contract. Exchange rate not found for USD to ARS. Please sync exchange rates first."
}
{
"status": "ERROR",
"code": "ZC001",
"message": "Entity is not associated"
}
Was this page helpful?

