--- title: "ADD Endpoint (POST)" slug: "add-endpoint-post" updated: 2022-11-21T20:51:55Z published: 2022-11-21T20:51:55Z canonical: "wiki.cobblestonesoftware.com/add-endpoint-post" --- > ## Documentation Index > Fetch the complete documentation index at: https://wiki.cobblestonesoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # ADD Endpoint (POST) ## ADD Endpoint (POST) #### Initial Preparation The Endpoint is accessed through the url: {{baseURL}}/CSSAPI/V2/{{entityName}} /Add - baseURL – your company’s ContractInsight URL - entityName – name of the database tables The HTTP request type is POST. Content type for this request is set to application/json. ![Graphical user interface, application, Teams Description automatically generated](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667416513642.png) #### Introduction Add Endpoint allows you to create records in Contract Insight database. Things to keep in mind when making calls to Add Endpoint: 1. Accepts only one insert at a time. No bulk insert is supported by REST API. 2. Fields that cannot be inserted include fields of type GUID (uniqueidentifier), password field, out-of-the-box date fields such as DateEntered, EntryDate, DateCreated, and CreatedDate. 3. Inserting duplicate records is allowed with some tables (tblCustomers for instance). The records will be assigned unique identifiers. Other field values will be identical. 4. Values that are required and have “HasDefaultValue” set to “false” must be provided. Values that are required and have “HasDefaultValue” set to “true” may be skipped. Request format The following format must be used in the request body when making calls to Add Endpoint: | Request Body (partial) ![](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667416630168.png) | 1. The request object has single key “**Tuple**” that corresponds to a record in SQL table. 2. **Tuple** represents an array (collection) of objects. They are essentially the attributes of an entity or columns in a database table. 3. Each object inside the collection has two keys: **Name** and **Value**. Name represents the column name. Value represents the value for that column. | | --- | --- | #### Response 1. Successful response has following fields: 1. **GeneratedId** – inserted record Id (number) 2. **Message** – contains text “Success” 2. Failed response will contain the following fields: 1. **LogId** – represents a GUID string 2. **Message** – Error message 3. **Exception** – the exception object. | Example of a successful response: ![](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667503212566.png) | Example of a failed response: ![](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667503226861.png) | | --- | --- | #### #### More on Failed Responses When supplying non-existing column name to the REST API, a similar to the above error will be returned. In the below snapshot, we attempted to insert some value to a column “Vendor Name” (with a space) in tblCustomers table. Such column doesn’t exist in the table and we get the error back: ![](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667416694449.png) Invalid data type supplied for the column value will produce an exception. If we attempt to insert a string value in a column that accepts an integer value, exception returned will be similar to the one below: ![](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667503483548.png) Please note when a column is of type string, and we set the value to Boolean (false/true), number (int/decimal), or even an object, the request will go through without errors, and the supplied value will be converted into a string: | ![](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667503632474.png) | When forming the request, we add an object for the “Value” key of the first Tuple. | | --- | --- | | ![](https://cdn.document360.io/e3626857-1fb5-4e27-b278-2d3fc5508be4/Images/Documentation/image-1667503651640.png) | The resulting value in tblCustomers for the VendorName column. |