POST api/Contracts

Create a new contract

Request Information

URI Parameters

None.

Body Parameters

Contract
NameDescriptionTypeAdditional information
ContractTypeId

integer

None.

Status

string

None.

OrgUnitId

integer

None.

ResponsibleUserId

integer

None.

ContractNumber

string

None.

PartyContractNumber

string

None.

AccountNumber

string

None.

CategoryId

integer

None.

RelatedContractIds

Collection of RelatedIdentity

None.

RelatedInventoryIds

Collection of RelatedIdentity

None.

Currency

string

None.

PartyId

integer

Obsolete, only for legacy support. Please use PartyIds instead.

PartyIds

Collection of integer

None.

StartDate

date

None.

Comments

Collection of Comment

None.

Documents

Collection of Document

None.

Duration

DateSpan

None.

NoticeLength

DateSpan

None.

RenewalNoticeLength

DateSpan

None.

ExpiryNotificationPeriod

DateSpan

None.

RenewalLength

DateSpan

None.

InvoiceFrequency

DateSpan

None.

AutoRenewal

boolean

None.

ExpiryNotificationsEnabled

boolean

None.

RecipientUserIds

Collection of integer

None.

EndDate

date

None.

Note

string

None.

InitialInvoiceAmount

decimal number

None.

StartupCost

decimal number

None.

Notifications

Collection of Notification

None.

AmountChanges

Collection of AmountChange

None.

FieldValues

Collection of EntityFieldValue

None.

InvoiceNotificationsEnabled

boolean

None.

InvoiceNotificationPeriod

DateSpan

None.

InvoiceRecipientUserIds

Collection of integer

None.

Terminated

boolean

None.

TerminatedAt

date

None.

ExpiresAt

date

None.

TagIds

Collection of integer

None.

CompanyId

integer

None.

Name

string

None.

LastModified

date

None.

Created

date

None.

Id

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ContractTypeId": 1,
  "Status": "sample string 2",
  "OrgUnitId": 3,
  "ResponsibleUserId": 4,
  "ContractNumber": "sample string 5",
  "PartyContractNumber": "sample string 6",
  "AccountNumber": "sample string 7",
  "CategoryId": 8,
  "RelatedContractIds": [
    {
      "External": true,
      "Id": 2
    },
    {
      "External": true,
      "Id": 2
    }
  ],
  "RelatedInventoryIds": [
    {
      "External": true,
      "Id": 2
    },
    {
      "External": true,
      "Id": 2
    }
  ],
  "Currency": "sample string 9",
  "PartyId": 10,
  "PartyIds": [
    1,
    2
  ],
  "StartDate": "2025-12-08T14:20:26.19423+00:00",
  "Comments": [
    {
      "UserId": 1,
      "Text": "sample string 2",
      "Date": "2025-12-08T14:20:26.2098052+00:00",
      "Id": 4
    },
    {
      "UserId": 1,
      "Text": "sample string 2",
      "Date": "2025-12-08T14:20:26.2098052+00:00",
      "Id": 4
    }
  ],
  "Documents": [
    {
      "ContentType": "sample string 1",
      "Content": "sample string 2",
      "ParseLanguage": "sample string 3",
      "CompanyId": 4,
      "Name": "sample string 5",
      "LastModified": "2025-12-08T14:20:26.2098052+00:00",
      "Created": "2025-12-08T14:20:26.2098052+00:00",
      "Id": 8
    },
    {
      "ContentType": "sample string 1",
      "Content": "sample string 2",
      "ParseLanguage": "sample string 3",
      "CompanyId": 4,
      "Name": "sample string 5",
      "LastModified": "2025-12-08T14:20:26.2098052+00:00",
      "Created": "2025-12-08T14:20:26.2098052+00:00",
      "Id": 8
    }
  ],
  "Duration": {
    "Count": 1,
    "Unit": "sample string 2"
  },
  "NoticeLength": {
    "Count": 1,
    "Unit": "sample string 2"
  },
  "RenewalNoticeLength": {
    "Count": 1,
    "Unit": "sample string 2"
  },
  "ExpiryNotificationPeriod": {
    "Count": 1,
    "Unit": "sample string 2"
  },
  "RenewalLength": {
    "Count": 1,
    "Unit": "sample string 2"
  },
  "InvoiceFrequency": {
    "Count": 1,
    "Unit": "sample string 2"
  },
  "AutoRenewal": true,
  "ExpiryNotificationsEnabled": true,
  "RecipientUserIds": [
    1,
    2
  ],
  "EndDate": "2025-12-08T14:20:26.2098052+00:00",
  "Note": "sample string 15",
  "InitialInvoiceAmount": 16.1,
  "StartupCost": 17.1,
  "Notifications": [
    {
      "Name": "sample string 1",
      "ReminderCount": 2,
      "EscalationCount": 3,
      "Active": true,
      "CommentText": "sample string 5",
      "StartDate": "2025-12-08T14:20:26.2098052+00:00",
      "EndDate": "2025-12-08T14:20:26.2098052+00:00",
      "Confirmed": "2025-12-08T14:20:26.2098052+00:00",
      "Type": "sample string 9",
      "ConfirmedByUserId": 10,
      "Message": "sample string 11",
      "RecipientUserIds": [
        1,
        2
      ],
      "Id": 12
    },
    {
      "Name": "sample string 1",
      "ReminderCount": 2,
      "EscalationCount": 3,
      "Active": true,
      "CommentText": "sample string 5",
      "StartDate": "2025-12-08T14:20:26.2098052+00:00",
      "EndDate": "2025-12-08T14:20:26.2098052+00:00",
      "Confirmed": "2025-12-08T14:20:26.2098052+00:00",
      "Type": "sample string 9",
      "ConfirmedByUserId": 10,
      "Message": "sample string 11",
      "RecipientUserIds": [
        1,
        2
      ],
      "Id": 12
    }
  ],
  "AmountChanges": [
    {
      "StartDate": "2025-12-08T14:20:26.2098052+00:00",
      "EndDate": "2025-12-08T14:20:26.2098052+00:00",
      "Type": "sample string 3",
      "Amount": 4.1,
      "Factor": 5.1,
      "RepeatInterval": 6,
      "ContractId": 7,
      "Name": "sample string 8",
      "LastModified": "2025-12-08T14:20:26.2098052+00:00",
      "Created": "2025-12-08T14:20:26.2098052+00:00",
      "Id": 11
    },
    {
      "StartDate": "2025-12-08T14:20:26.2098052+00:00",
      "EndDate": "2025-12-08T14:20:26.2098052+00:00",
      "Type": "sample string 3",
      "Amount": 4.1,
      "Factor": 5.1,
      "RepeatInterval": 6,
      "ContractId": 7,
      "Name": "sample string 8",
      "LastModified": "2025-12-08T14:20:26.2098052+00:00",
      "Created": "2025-12-08T14:20:26.2098052+00:00",
      "Id": 11
    }
  ],
  "FieldValues": [
    {
      "FieldId": 1,
      "DateValue": "2025-12-08T14:20:26.2098052+00:00",
      "StringValue": "sample string 2",
      "IntValue": 1,
      "FloatValue": 1.1,
      "BoolValue": true
    },
    {
      "FieldId": 1,
      "DateValue": "2025-12-08T14:20:26.2098052+00:00",
      "StringValue": "sample string 2",
      "IntValue": 1,
      "FloatValue": 1.1,
      "BoolValue": true
    }
  ],
  "InvoiceNotificationsEnabled": true,
  "InvoiceNotificationPeriod": {
    "Count": 1,
    "Unit": "sample string 2"
  },
  "InvoiceRecipientUserIds": [
    1,
    2
  ],
  "Terminated": true,
  "TerminatedAt": "2025-12-08T14:20:26.2098052+00:00",
  "ExpiresAt": "2025-12-08T14:20:26.2098052+00:00",
  "TagIds": [
    1,
    2
  ],
  "CompanyId": 22,
  "Name": "sample string 23",
  "LastModified": "2025-12-08T14:20:26.2098052+00:00",
  "Created": "2025-12-08T14:20:26.2098052+00:00",
  "Id": 26
}

application/xml, text/xml

Sample:
<Contract xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ControlKeeper.ApiModel">
  <Id>26</Id>
  <Created>2025-12-08T14:20:26.2098052+00:00</Created>
  <LastModified>2025-12-08T14:20:26.2098052+00:00</LastModified>
  <Name>sample string 23</Name>
  <CompanyId>22</CompanyId>
  <AccountNumber>sample string 7</AccountNumber>
  <AmountChanges>
    <AmountChange>
      <Id>11</Id>
      <Created>2025-12-08T14:20:26.2098052+00:00</Created>
      <LastModified>2025-12-08T14:20:26.2098052+00:00</LastModified>
      <Name>sample string 8</Name>
      <Amount>4.1</Amount>
      <ContractId>7</ContractId>
      <EndDate>2025-12-08T14:20:26.2098052+00:00</EndDate>
      <Factor>5.1</Factor>
      <RepeatInterval>6</RepeatInterval>
      <StartDate>2025-12-08T14:20:26.2098052+00:00</StartDate>
      <Type>sample string 3</Type>
    </AmountChange>
    <AmountChange>
      <Id>11</Id>
      <Created>2025-12-08T14:20:26.2098052+00:00</Created>
      <LastModified>2025-12-08T14:20:26.2098052+00:00</LastModified>
      <Name>sample string 8</Name>
      <Amount>4.1</Amount>
      <ContractId>7</ContractId>
      <EndDate>2025-12-08T14:20:26.2098052+00:00</EndDate>
      <Factor>5.1</Factor>
      <RepeatInterval>6</RepeatInterval>
      <StartDate>2025-12-08T14:20:26.2098052+00:00</StartDate>
      <Type>sample string 3</Type>
    </AmountChange>
  </AmountChanges>
  <AutoRenewal>true</AutoRenewal>
  <CategoryId>8</CategoryId>
  <Comments>
    <Comment>
      <Id>4</Id>
      <Date>2025-12-08T14:20:26.2098052+00:00</Date>
      <Text>sample string 2</Text>
      <UserId>1</UserId>
    </Comment>
    <Comment>
      <Id>4</Id>
      <Date>2025-12-08T14:20:26.2098052+00:00</Date>
      <Text>sample string 2</Text>
      <UserId>1</UserId>
    </Comment>
  </Comments>
  <ContractNumber>sample string 5</ContractNumber>
  <ContractTypeId>1</ContractTypeId>
  <Currency>sample string 9</Currency>
  <Documents>
    <Document>
      <Id>8</Id>
      <Created>2025-12-08T14:20:26.2098052+00:00</Created>
      <LastModified>2025-12-08T14:20:26.2098052+00:00</LastModified>
      <Name>sample string 5</Name>
      <CompanyId>4</CompanyId>
      <Content>sample string 2</Content>
      <ContentType>sample string 1</ContentType>
      <ParseLanguage>sample string 3</ParseLanguage>
    </Document>
    <Document>
      <Id>8</Id>
      <Created>2025-12-08T14:20:26.2098052+00:00</Created>
      <LastModified>2025-12-08T14:20:26.2098052+00:00</LastModified>
      <Name>sample string 5</Name>
      <CompanyId>4</CompanyId>
      <Content>sample string 2</Content>
      <ContentType>sample string 1</ContentType>
      <ParseLanguage>sample string 3</ParseLanguage>
    </Document>
  </Documents>
  <Duration>
    <Count>1</Count>
    <Unit>sample string 2</Unit>
  </Duration>
  <EndDate>2025-12-08T14:20:26.2098052+00:00</EndDate>
  <ExpiresAt>2025-12-08T14:20:26.2098052+00:00</ExpiresAt>
  <ExpiryNotificationPeriod>
    <Count>1</Count>
    <Unit>sample string 2</Unit>
  </ExpiryNotificationPeriod>
  <ExpiryNotificationsEnabled>true</ExpiryNotificationsEnabled>
  <FieldValues>
    <EntityFieldValue>
      <BoolValue>true</BoolValue>
      <DateValue>2025-12-08T14:20:26.2098052+00:00</DateValue>
      <FieldId>1</FieldId>
      <FloatValue>1.1</FloatValue>
      <IntValue>1</IntValue>
      <StringValue>sample string 2</StringValue>
    </EntityFieldValue>
    <EntityFieldValue>
      <BoolValue>true</BoolValue>
      <DateValue>2025-12-08T14:20:26.2098052+00:00</DateValue>
      <FieldId>1</FieldId>
      <FloatValue>1.1</FloatValue>
      <IntValue>1</IntValue>
      <StringValue>sample string 2</StringValue>
    </EntityFieldValue>
  </FieldValues>
  <InitialInvoiceAmount>16.1</InitialInvoiceAmount>
  <InvoiceFrequency>
    <Count>1</Count>
    <Unit>sample string 2</Unit>
  </InvoiceFrequency>
  <InvoiceNotificationPeriod>
    <Count>1</Count>
    <Unit>sample string 2</Unit>
  </InvoiceNotificationPeriod>
  <InvoiceNotificationsEnabled>true</InvoiceNotificationsEnabled>
  <InvoiceRecipientUserIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </InvoiceRecipientUserIds>
  <Note>sample string 15</Note>
  <NoticeLength>
    <Count>1</Count>
    <Unit>sample string 2</Unit>
  </NoticeLength>
  <Notifications>
    <Notification>
      <Id>12</Id>
      <Active>true</Active>
      <CommentText>sample string 5</CommentText>
      <Confirmed>2025-12-08T14:20:26.2098052+00:00</Confirmed>
      <ConfirmedByUserId>10</ConfirmedByUserId>
      <EndDate>2025-12-08T14:20:26.2098052+00:00</EndDate>
      <EscalationCount>3</EscalationCount>
      <Message>sample string 11</Message>
      <Name>sample string 1</Name>
      <RecipientUserIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </RecipientUserIds>
      <ReminderCount>2</ReminderCount>
      <StartDate>2025-12-08T14:20:26.2098052+00:00</StartDate>
      <Type>sample string 9</Type>
    </Notification>
    <Notification>
      <Id>12</Id>
      <Active>true</Active>
      <CommentText>sample string 5</CommentText>
      <Confirmed>2025-12-08T14:20:26.2098052+00:00</Confirmed>
      <ConfirmedByUserId>10</ConfirmedByUserId>
      <EndDate>2025-12-08T14:20:26.2098052+00:00</EndDate>
      <EscalationCount>3</EscalationCount>
      <Message>sample string 11</Message>
      <Name>sample string 1</Name>
      <RecipientUserIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>1</d4p1:int>
        <d4p1:int>2</d4p1:int>
      </RecipientUserIds>
      <ReminderCount>2</ReminderCount>
      <StartDate>2025-12-08T14:20:26.2098052+00:00</StartDate>
      <Type>sample string 9</Type>
    </Notification>
  </Notifications>
  <OrgUnitId>3</OrgUnitId>
  <PartyContractNumber>sample string 6</PartyContractNumber>
  <PartyId>10</PartyId>
  <PartyIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </PartyIds>
  <RecipientUserIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </RecipientUserIds>
  <RelatedContractIds>
    <RelatedIdentity>
      <Id>2</Id>
      <External>true</External>
    </RelatedIdentity>
    <RelatedIdentity>
      <Id>2</Id>
      <External>true</External>
    </RelatedIdentity>
  </RelatedContractIds>
  <RelatedInventoryIds>
    <RelatedIdentity>
      <Id>2</Id>
      <External>true</External>
    </RelatedIdentity>
    <RelatedIdentity>
      <Id>2</Id>
      <External>true</External>
    </RelatedIdentity>
  </RelatedInventoryIds>
  <RenewalLength>
    <Count>1</Count>
    <Unit>sample string 2</Unit>
  </RenewalLength>
  <RenewalNoticeLength>
    <Count>1</Count>
    <Unit>sample string 2</Unit>
  </RenewalNoticeLength>
  <ResponsibleUserId>4</ResponsibleUserId>
  <StartDate>2025-12-08T14:20:26.19423+00:00</StartDate>
  <StartupCost>17.1</StartupCost>
  <Status>sample string 2</Status>
  <TagIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:int>1</d2p1:int>
    <d2p1:int>2</d2p1:int>
  </TagIds>
  <Terminated>true</Terminated>
  <TerminatedAt>2025-12-08T14:20:26.2098052+00:00</TerminatedAt>
</Contract>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

integer

Response Formats

application/json, text/json

Sample:
1

application/xml, text/xml

Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>