PUT v1/account/{id}/contract/{contractid}

Update an account contract for the authenticated user

Request Information

URI Parameters

NameDescriptionTypeAdditional Information
id

ID of the account you want to update the contract for

string

Required.

contractid

ID of the contract you want to update

string

Required.

Body Parameters

Information about the contract

UpdateContractModel
NameDescriptionTypeAdditional Information
AccountContractID

The contract's Unique ID

string

Required.

Name

Contract Name

string

Required.

Description

Description or notes about the account

string

None.

StartDate

The start of the contract

date

Required.

EndDate

The start of the contract

date

Required.

Value

The total value of the contract (no abbreviations)

decimal number

Required.

CustomFields

Custom Field List (if they have been defined)

Collection of UDFFieldModel

None.

Request Formats

application/json, text/json, text/html

Sample:
{
  "AccountContractID": "sample string 1",
  "Name": "sample string 2",
  "Description": "sample string 3",
  "StartDate": "2025-05-24T10:20:32.1172801+00:00",
  "EndDate": "2025-05-24T10:20:32.1172801+00:00",
  "Value": 6.1,
  "CustomFields": [
    {
      "FieldName": "sample string 1",
      "Type": "sample string 2",
      "StringValue": "sample string 3",
      "DoubleValue": 4.1,
      "DatetimeValue": "2025-05-24T10:20:32.1172801+00:00"
    },
    {
      "FieldName": "sample string 1",
      "Type": "sample string 2",
      "StringValue": "sample string 3",
      "DoubleValue": 4.1,
      "DatetimeValue": "2025-05-24T10:20:32.1172801+00:00"
    }
  ]
}

application/xml, text/xml

Sample:
<UpdateContractModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/KAPTA.Domain.ViewModel.v1">
  <AccountContractID>sample string 1</AccountContractID>
  <CustomFields>
    <UDFFieldModel>
      <DatetimeValue>2025-05-24T10:20:32.1172801+00:00</DatetimeValue>
      <DoubleValue>4.1</DoubleValue>
      <FieldName>sample string 1</FieldName>
      <StringValue>sample string 3</StringValue>
      <Type>sample string 2</Type>
    </UDFFieldModel>
    <UDFFieldModel>
      <DatetimeValue>2025-05-24T10:20:32.1172801+00:00</DatetimeValue>
      <DoubleValue>4.1</DoubleValue>
      <FieldName>sample string 1</FieldName>
      <StringValue>sample string 3</StringValue>
      <Type>sample string 2</Type>
    </UDFFieldModel>
  </CustomFields>
  <Description>sample string 3</Description>
  <EndDate>2025-05-24T10:20:32.1172801+00:00</EndDate>
  <Name>sample string 2</Name>
  <StartDate>2025-05-24T10:20:32.1172801+00:00</StartDate>
  <Value>6.1</Value>
</UpdateContractModel>

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, text/html

Sample:
{
  "AccountID": "sample string 1",
  "AccountName": "sample string 2",
  "ContractID": "sample string 3",
  "Name": "sample string 4",
  "Description": "sample string 5",
  "StartDate": "2025-05-24T10:20:32.1284265+00:00",
  "EndDate": "2025-05-24T10:20:32.1284265+00:00",
  "Value": 8.1,
  "CustomFields": [
    {
      "FieldName": "sample string 1",
      "Type": "sample string 2",
      "StringValue": "sample string 3",
      "DoubleValue": 4.1,
      "DatetimeValue": "2025-05-24T10:20:32.1284265+00:00"
    },
    {
      "FieldName": "sample string 1",
      "Type": "sample string 2",
      "StringValue": "sample string 3",
      "DoubleValue": 4.1,
      "DatetimeValue": "2025-05-24T10:20:32.1284265+00:00"
    }
  ],
  "DateModified": "2025-05-24T10:20:32.1284265+00:00",
  "DateCreated": "2025-05-24T10:20:32.1284265+00:00"
}

application/xml, text/xml

Sample:
<ContractModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/KAPTA.Domain.ViewModel.v1">
  <AccountID>sample string 1</AccountID>
  <AccountName>sample string 2</AccountName>
  <ContractID>sample string 3</ContractID>
  <CustomFields>
    <UDFFieldModel>
      <DatetimeValue>2025-05-24T10:20:32.1284265+00:00</DatetimeValue>
      <DoubleValue>4.1</DoubleValue>
      <FieldName>sample string 1</FieldName>
      <StringValue>sample string 3</StringValue>
      <Type>sample string 2</Type>
    </UDFFieldModel>
    <UDFFieldModel>
      <DatetimeValue>2025-05-24T10:20:32.1284265+00:00</DatetimeValue>
      <DoubleValue>4.1</DoubleValue>
      <FieldName>sample string 1</FieldName>
      <StringValue>sample string 3</StringValue>
      <Type>sample string 2</Type>
    </UDFFieldModel>
  </CustomFields>
  <DateCreated>2025-05-24T10:20:32.1284265+00:00</DateCreated>
  <DateModified>2025-05-24T10:20:32.1284265+00:00</DateModified>
  <Description>sample string 5</Description>
  <EndDate>2025-05-24T10:20:32.1284265+00:00</EndDate>
  <Name>sample string 4</Name>
  <StartDate>2025-05-24T10:20:32.1284265+00:00</StartDate>
  <Value>8.1</Value>
</ContractModel>