Create Counterparty

Purpose

To create a counterparty.

Request Details

Request URL

https://contracts.zoho.com/api/v1/counterparties

Authorization

Authorization: Zoho-oauthtoken 1000.67013ab3960787bcf3affae67e649fc0.83a789c859e040bf11e7d05f9c8b5ef6

Scope

contracts.contracts.CREATE, contracts.contracts.ALL

Possible Operation Types

ALL - Full access to counterparty details
CREATE - Create counterparty details

Sample Request

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

Input JSON Keys

  • namestring

    Represents the name of the counterparty.

  • counterPartyTypeshort

    Represents the API name of the counterparty type.

  • country, city, state, address, zipCode, buildingNumberstring

    Represents the address details of the counterparty.

  • websitestring

    Represents the website of the counterparty.

  • usersJSON Object

    Represents the counterparty contact details.

Sample Input

Copied{
  "name": String,
  "city": String,
  "country": String (country code),
  "state": String (state code for India and US states),
  "buildingNumber": String,
  "address": String,
  "zipCode": String,
  "website": String,
  "counterPartyType": String (Counterparty type apiName),
  "users": 
  [
    {
      "displayName": String,
      "emailId": String,
      "jobTitle": String,
      "phoneNumber": String
    }
  ]
}

Response JSON Keys

  • modifiedTimestring

    Represents the time of modification.

  • namestring

    Represents the name of the counterparty.

  • idstring

    Represents the unique ID of the counterparty.

  • organizationApiNamestring

    Represents the name of the counterparty in the API.

  • addedTimestring

    Represents the time when the counterparty is created.

  • modifiedByuser

    Represents the last user who modified the counterparty.

  • counterPartyTypeCounterpartyType(short)

    Represents the API name of the counterparty type.

  • emailIdlong

    Represents the email address associated with the counterparty contact person.

  • country, city, state, address, zipCodestring

    Represents the address details of the counterparty.

  • websitestring

    Represents the website of the counterparty.

  • usersJSON Object

    Represents the counterparty contact details.

Sample Response

Copied{
    "counterparties": [
        {
            "country": String (country code),
            "zipCode": String,
            "modifiedTime": String,
            "website": String,
            "address": String,
            "city": String,
            "counterPartyType": {
                "apiName": String,
                "id": String
            },
            "addedBy": {{User short}},
            "users": [
                String (user emailid)
            ],
            "organizationApiName": String,
            "name": String,
            "addedTime": String,
            "buildingNumber": String,
            "modifiedBy": {{User short}},
            "id": String,
            "state": String (State code for US, IN)
        }
    ]
}

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.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.