POST api/agreements/articleline
Add an article line to agreement.
Request Information
URI Parameters
None.
Body Parameters
AgreementArticleLinePostRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| AgreementNumber |
Number of agreement |
integer |
None. |
| ArticleNo |
Article number |
integer |
Required |
| Price |
decimal(18,2) |
decimal number |
None. |
| DiscountFactor |
Discount factor, 1.0 = 100% discount, 0.5 = 50% discount |
decimal number |
None. |
| ValidFrom |
Date when article line is valid from |
date |
None. |
| ValidTo |
Date when article line is valid to |
date |
None. |
| CalculatedPrice |
If true, discount will not appear on orderlines |
boolean |
Required |
| Blocked |
If true, customer is not allowed to order the article |
boolean |
Required |
Remarks
If article already exists on agreement the existing line will be updated
Example
None.
Request Formats
application/json, text/json
Sample:
{
"AgreementNumber": 1,
"ArticleNo": 2,
"Price": 1.0,
"DiscountFactor": 1.0,
"ValidFrom": "12/21/2025 1:04:19 PM",
"ValidTo": "12/21/2025 1:04:19 PM",
"CalculatedPrice": true,
"Blocked": true
}
application/xml, text/xml
Sample:
<AgreementArticleLinePostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement"> <ArticleNo>2</ArticleNo> <Blocked>true</Blocked> <CalculatedPrice>true</CalculatedPrice> <DiscountFactor>1</DiscountFactor> <Price>1</Price> <ValidFrom>2025-12-21T13:04:19.7045301+00:00</ValidFrom> <ValidTo>2025-12-21T13:04:19.7045301+00:00</ValidTo> <AgreementNumber>1</AgreementNumber> </AgreementArticleLinePostRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
AgreementArticleLinePostResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Errors |
List of errors when adding an article line to agreement |
Collection of PostAgreementArticleLineError |
None. |
| Success |
Returns true if article line is added to agreement |
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:
<AgreementArticleLinePostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement">
<Errors>
<PostAgreementArticleLineError>
<ErrorCode>InternalServerError</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</PostAgreementArticleLineError>
<PostAgreementArticleLineError>
<ErrorCode>InternalServerError</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</PostAgreementArticleLineError>
</Errors>
<Success>true</Success>
</AgreementArticleLinePostResponse>