POST api/contract
This method adds a new contract to a specified company.
Request Information
URI Parameters
None.
Body Parameters
ContractPostRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| DisplayName | The name of the contract | string |
String length: inclusive between 0 and 100 |
| CompanyID | The company ID to assign the contract to | integer |
None. |
| StartDate | The date the contract is active | date |
None. |
| ContractTerm | How long the contract will run for | integer |
None. |
| AccountManagerID | The ID of the account Manager to assign to the contract | integer |
None. |
| AgentCompanyID | The ID of the Agent Company assigned to the contract | integer |
None. |
| AgentContactID | The Agent's contract ID | integer |
None. |
| Cancelled | Indiates whether the contract has been cancelled | boolean |
None. |
| CancelledDate | Inidates when the contract will be or has been cancelled | date |
None. |
| TerminationDate | Indiates the date when the contracted will be terminated | date |
None. |
| ContractFilename | The file name of the contract | string |
String length: inclusive between 0 and 255 |
| EstimatedUsage | Amount (in £) over any bundle on the contract | decimal number |
None. |
| EstimatedUsageMargin | Amount of overspend that will be profit | decimal number |
None. |
| TechFundBalance | Displays the technology Fund Balance | decimal number |
None. |
| Notes | Displays any notes of the contract | string |
String length: inclusive between 0 and 2000 |
| MaxCLIs | The maximum number of CLIs on this contract | integer |
None. |
| NetworkProviderID | The ID of the Network Provider | integer |
None. |
Request Formats
application/json, text/json
Sample:
{
"DisplayName": "sample string 1",
"CompanyID": 2,
"StartDate": "2025-12-16T09:36:38.738",
"ContractTerm": 4,
"AccountManagerID": 1,
"AgentCompanyID": 1,
"AgentContactID": 1,
"Cancelled": true,
"CancelledDate": "2025-12-16T09:36:38.738",
"TerminationDate": "2025-12-16T09:36:38.738",
"ContractFilename": "sample string 6",
"EstimatedUsage": 1.0,
"EstimatedUsageMargin": 1.1,
"TechFundBalance": 1.0,
"Notes": "sample string 7",
"MaxCLIs": 1,
"NetworkProviderID": 1
}
application/xml, text/xml
Sample:
<ContractPostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.WebAPI.Models.Company"> <AccountManagerID>1</AccountManagerID> <AgentCompanyID>1</AgentCompanyID> <AgentContactID>1</AgentContactID> <Cancelled>true</Cancelled> <CancelledDate>2025-12-16T09:36:38.738</CancelledDate> <CompanyID>2</CompanyID> <ContractFilename>sample string 6</ContractFilename> <ContractTerm>4</ContractTerm> <DisplayName>sample string 1</DisplayName> <EstimatedUsage>1</EstimatedUsage> <EstimatedUsageMargin>1.1</EstimatedUsageMargin> <MaxCLIs>1</MaxCLIs> <NetworkProviderID>1</NetworkProviderID> <Notes>sample string 7</Notes> <StartDate>2025-12-16T09:36:38.738</StartDate> <TechFundBalance>1</TechFundBalance> <TerminationDate>2025-12-16T09:36:38.738</TerminationDate> </ContractPostRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ContractPostResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| ContractID | integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"ContractID": 1
}
application/xml, text/xml
Sample:
<ContractPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/aBILLity.WebAPI.Models.Company"> <ContractID>1</ContractID> </ContractPostResponse>