Skip to main content

Create Contract Type

Purpose

To create a contract type.

Request Details

Request URL

https://contracts.zoho.com/api/v1/admin/contracttypes

Authorization

Authorization: Zoho-oauthtoken 1000.67013ab3960787bcf3affae67e649fc0.83a789c859e040bf11e7d05f9c8b5ef6

Scope

contracts.meta.CREATE, contracts.contracts.ALL

Possible Operation Types

ALL - Full access to contract type details
CREATE - Create contract type

Sample Request

Copiedcurl "https://contracts.zoho.com/api/v1/admin/contracttypes"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.67013ab3960787bcf3affae67e649fc0.83a789c859e040bf11e7d05f9c8b5ef6"

Input JSON Keys

  • namestring

    Represents the name of the contract type.

  • descriptionstring

    Represents the description of the contract type.

  • intentinteger

    Represents the status of the contract type.

    ValueDescription
    0Others
    1Buy
    2Sell
  • party Ainteger

    Represents the contracting party in a contract.

    ValueDescription
    0My Company
    1Counterparty
  • party Binteger

    Represents the contracting party in a contract.

    ValueDescription
    0My Company
    1Counterparty
  • isCustomboolean

    Represents whether the contract type is custom build.

  • categoriesstring

    Represents the category of the contract type.

  • approvalWorkflowstring

    Represents the approval workflow assigned to the contract type.

  • stateinteger

    Represents the working status of the contract type template.

    ValueDescription
    0Disabled
    1Enabled

Sample Input

Copied{
  "name": String,
  "categories": [
    String
  ],
  "description": String,
  "intent": Integer,
  "partyA": Integer,
  "partyB": Integer,
  "approvalWorkflow": String,
  "state": Integer,
  "isCustom": Boolean
}

Response JSON Keys

  • modifiedTimestring

    Represents the time of modification.

  • namestring

    Represents the name of the contract type.

  • idstring

    Represents the unique ID of the contract type.

  • addedBystring

    Represents the user who created the contract type.

  • apiNamestring

    Represents the name of the contract type in the API.

  • addedTimestring

    Represents the time when the contract type is created.

  • modifiedByuser

    Represents the last user who modified the contract type.

  • versionStateinteger

    Represents the status of the contract type.

    ValueDescription
    1Draft
    2Published
    3Published and Modified
  • descriptionstring

    Represents the description of the contract type.

  • intentinteger

    Represents whether the contract created using this contract type is for buying goods/services or selling goods/services or any other purpose.

    ValueDescription
    0Others
    1Buy
    2Sell
  • party Ainteger

    Represents the contracting party in a contract.

    ValueDescription
    0My Company
    1Counterparty
  • party Binteger

    Represents the contracting party in a contract.

    ValueDescription
    0My Company
    1Counterparty
  • isCustomboolean

    Represents whether the contract type is custom build.

  • categoriesstring

    Represents the category of the contract type.

  • approvalWorkflowstring

    Represents the approval workflow assigned to the contract type.

  • stateinteger

    Represents the working status of the contract type template.

    ValueDescription
    0Disabled
    1Enabled

Sample Response

Copied{
    "contracttypes": [
        {
            "modifiedTime": String,
            "apiName": String,
            "versionState": Integer,
            "addedBy": {
                "role": String,
                "displayName": String,
                "emailId": String,
                "id": String,
                "status": String,
                "zuid": Long
            },
            "description": String,
            "intent": Integer,
            "partyA": Integer,
            "partyB": Integer,
            "name": "String,
            "addedTime": String,
            "isCustom": Boolean,
            "modifiedBy": {
                "role": String,
                "displayName": String,
                "emailId": String,
                "id": String,
                "status": String,
                "zuid": Long
            },
            "categories": [
                {
                    "apiName": String,
                    "name": String
                }
            ],
            "id": String,
            "state": Integer,
            "approvalWorkflow": {
                "apiName": String,
                "name": String
            },
            "status": Integer
        }
    ]
}

Legend

versionState 
	            DRAFT - 1
	            PUBLISHED - 2
	            PUBLISHED_MODIFIED - 3

intent 
	OTHERS - 0
	BUY - 1
	SELL - 2

partyA 
	  MY_COMPANY - 0
          COUNTERPARTY - 1

partyB 
 	  MY_COMPANY - 0
          COUNTERPARTY - 1

state
	DISABLED - 0
	ENABLED - 1

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.meta.CREATE scope. Create a new client with valid scope. Refer to the Scope section above.

NO_PERMISSIONHTTP 403

Permission denied to create

Resolution: The user does not have permission to create 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 create module details.

Resolution: The user does not have permission to create module details. Contact your organization administrator.

 Zoho Contracts Developer Community