PUT api/Agreements
Updates an agreement.
Request Information
URI Parameters
None.
Body Parameters
AgreementPutRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| NewAgreementNumber |
Use this to update to a new agreement number |
integer |
None. |
| OwnerUserName |
Owner of the agreement |
string |
Required Max length: 256 |
| Number |
Agreement number |
integer |
Required |
| Name |
Name of the agreement |
string |
Required Max length: 40 |
| BranchId |
Id of the branch |
integer |
Required |
| ValidFrom |
Date when agreement is valid from |
date |
Required |
| ValidTo |
Date when agreement is not valid anymore |
date |
Required |
| GeneralAgreementNo |
Agreementnumber for the main agreement |
integer |
None. |
| PriceListId |
Id of the price list |
globally unique identifier |
Required |
| FixedArticlePrices |
If true: Articleprice can't be changed on an order |
boolean |
Required |
| FixedArticlePricesUntil |
Date for how long the article prices may not be changed |
date |
None. |
| ZoneId |
Id of the zone |
integer |
None. |
| Document | string |
Max length: 4000 |
Remarks
None.
Example
None.
Request Formats
application/json, text/json
Sample:
{
"NewAgreementNumber": 1,
"OwnerUserName": "sample string 1",
"Number": 2,
"Name": "sample string 3",
"BranchId": 1,
"ValidFrom": "12/21/2025 1:02:44 PM",
"ValidTo": "12/21/2025 1:02:44 PM",
"GeneralAgreementNo": 1,
"PriceListId": "19b05323-b964-4949-a0ff-f3ff09587d12",
"FixedArticlePrices": true,
"FixedArticlePricesUntil": "12/21/2025 1:02:44 PM",
"ZoneId": 1,
"Document": "sample string 8"
}
application/xml, text/xml
Sample:
<AgreementPutRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement"> <BranchId>1</BranchId> <Document>sample string 8</Document> <FixedArticlePrices>true</FixedArticlePrices> <FixedArticlePricesUntil>2025-12-21T13:02:44.592928+00:00</FixedArticlePricesUntil> <GeneralAgreementNo>1</GeneralAgreementNo> <Name>sample string 3</Name> <Number>2</Number> <PriceListId>19b05323-b964-4949-a0ff-f3ff09587d12</PriceListId> <ValidFrom>2025-12-21T13:02:44.592928+00:00</ValidFrom> <ValidTo>2025-12-21T13:02:44.592928+00:00</ValidTo> <ZoneId>1</ZoneId> <OwnerUserName>sample string 1</OwnerUserName> <NewAgreementNumber>1</NewAgreementNumber> </AgreementPutRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
AgreementPutResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Errors |
List of errors when updating an agreement |
Collection of PutAgreementError |
None. |
| Success |
True if agreement was updated otherwise false |
boolean |
None. |
Response Formats
application/json, text/json
Sample:
{
"Errors": [
{
"ErrorCode": 1,
"ErrorMessage": "sample string 1"
},
{
"ErrorCode": 1,
"ErrorMessage": "sample string 1"
}
],
"Success": true
}
application/xml, text/xml
Sample:
<AgreementPutResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement">
<Errors>
<PutAgreementError>
<ErrorCode>InternalServerError</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</PutAgreementError>
<PutAgreementError>
<ErrorCode>InternalServerError</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</PutAgreementError>
</Errors>
<Success>true</Success>
</AgreementPutResponse>