Update Contract
Purpose
To update the details of a contract.
Endpoints
Request Details
Request URL
https://contracts.zoho.com/api/v1/contracts/{apiName}
Authorization
Authorization: Zoho-oauthtoken 1000.67013ab3960787bcf3affae67e649fc0.83a789c859e040bf11e7d05f9c8b5ef6
Scope
contracts.contracts.UPDATE, contracts.contracts.ALL
Possible Operation Types
ALL - Full access to contract details
UPDATE - Update contract details
Sample Request
Copiedcurl "https://contracts.zoho.com/api/v1/contracts/sla-with-zylker"
-X UPDATE
-H "Authorization: Zoho-oauthtoken 1000.67013ab3960787bcf3affae67e649fc0.83a789c859e040bf11e7d05f9c8b5ef6"
Input JSON Keys
- sourcenumber
Represents the origin of the contract.
Value Description 1 The contract was created within Zoho Contracts. 2 The contract was imported within Zoho Contracts. 3 The contract was created from an integrated application. For example, in Zoho CRM integration, the contract was created based on the contract request from Zoho CRM's Deals module.
- inputfieldsJSON Array
Represents the fields whose values are to be updated in a contract.
- metaApiNamestring
Represents the API name of the field whose value needs to be updated in a contract. The field can be a particular field or a field and its related fields.
- inputsJSON Array
The array represents the API names of the fields whose value needs to be updated in a contract.
- inputApiNamestring
Represents the API name of the field whose value needs to be updated in a contract. Refer to the inputApiNames List below that lists all the values of the inputApiName key.
- inputValue
Represents the value of the field that needs to be updated. Regarding the data type, refer to the data type of each of the inputApiNames' values in the inputApiNames List below.
Refer to Create Contract API to view the inputApiNames' values in the inputAPiNames List of the Input JSON Keys section and know the details.
Sample Input
Copied{
"source": 1,
"inputfields": [
{
"metaApiName": "requester-name",
"inputs": [
{
"inputApiName": "requester-name",
"inputValue": "Kevin Spacey"
}
]
},
{
"metaApiName": "requester-department",
"inputs": [
{
"inputApiName": "requester-department",
"inputValue": "Sales"
}
]
},
{
"metaApiName":"party-b-name",
"inputs":[
{
"inputApiName":"party-b-name",
"inputValue":"Steve Mitnik"
}
]
},
{
"metaApiName": "counterparty-primary-contact",
"inputs": [
{
"inputApiName": "party-b-primary-contact-name",
"inputValue": "steve.mitnik@zylker.com"
}
]
},
{
"metaApiName": "termination-notice-period",
"inputs": [
{
"inputApiName": "termination-notice-period",
"inputValue": 15
}
]
}
]
}
Response JSON Keys
- Typestring
Represents the request was successful.
- apiNamestring
Represents the API name of the contract.
Sample Response
Copied{
"Type": "Success",
"apiName": "sla-with-zylker"
}
Possible Errors
INVALID_URL_PATTERNHTTP 404
Request URL is incorrect
Resolution: Specify a valid request URL. Refer to the Request URL section above.
OAUTH_SCOPE_MISMATCHHTTP 401
Unauthorized
Resolution: Client does not have contracts.contracts.UPDATE scope. Create a new client with valid scope. Refer to the Scope section above.
NO_PERMISSIONHTTP 403
Permission denied to update
Resolution: The user does not have permission to update records. Contact your organization administrator.
INTERNAL_ERRORHTTP 500
Internal Server Error
Resolution: Unexpected and unhandled exception in the server.
INVALID_REQUEST_METHODHTTP 400
The HTTP request method is not a valid one.
Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to the Endpoints section above.
AUTHORIZATION_FAILEDHTTP 400
The user does not have sufficient privilege to update module details.
Resolution: The user does not have permission to update module details. Contact your organization administrator.