POST api/agreements/articlegroupline

Add an article group line to agreement.

Request Information

URI Parameters

None.

Body Parameters

AgreementArticleGroupLinePostRequest
NameDescriptionTypeAdditional information
AgreementNumber

Number of agreement

integer

None.

MainGroupId

Id of main group

integer

None.

SubGroupId

Id of sub group

integer

None.

DiscountFactor

Discount factor, 1.0 = 100% discount, 0.5 = 50%
decimal(18,4)

decimal number

Required

SpeedRatingId

Id of speed rating

integer

None.

AspectRatio

decimal(9,2)

decimal number

None.

Pattern

Tread pattern

string

Max length: 50

RimDiameter

decimal(9,2)

decimal number

None.

Design

string

Max length: 50

CalculatedPrice

If true, discount will not appear on orderlines

boolean

Required

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "AgreementNumber": 1,
  "MainGroupId": 2,
  "SubGroupId": 3,
  "DiscountFactor": 4.0,
  "SpeedRatingId": 1,
  "AspectRatio": 1.0,
  "Pattern": "sample string 5",
  "RimDiameter": 1.0,
  "Design": "sample string 6",
  "CalculatedPrice": true
}

application/xml, text/xml

Sample:
<AgreementArticleGroupLinePostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement">
  <AspectRatio>1</AspectRatio>
  <CalculatedPrice>true</CalculatedPrice>
  <Design>sample string 6</Design>
  <DiscountFactor>4</DiscountFactor>
  <MainGroupId>2</MainGroupId>
  <Pattern>sample string 5</Pattern>
  <RimDiameter>1</RimDiameter>
  <SpeedRatingId>1</SpeedRatingId>
  <SubGroupId>3</SubGroupId>
  <AgreementNumber>1</AgreementNumber>
</AgreementArticleGroupLinePostRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'AgreementArticleGroupLinePostRequest'.

Response Information

Resource Description

AgreementArticleGroupLinePostResponse
NameDescriptionTypeAdditional information
Errors

List of errors when adding an article group line to agreement

Collection of PostAgreementArticleGroupLineError

None.

Success

Returns true if article group line is added to agreement

boolean

None.

Id

Id of the created article group line

globally unique identifier

None.

Response Formats

application/json, text/json

Sample:
{
  "Errors": [
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    },
    {
      "ErrorCode": 1,
      "ErrorMessage": "sample string 1"
    }
  ],
  "Success": true,
  "Id": "ad5b775b-c812-4b6d-8ede-ed4c01e8eb37"
}

application/xml, text/xml

Sample:
<AgreementArticleGroupLinePostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement">
  <Errors>
    <PostAgreementArticleGroupLineError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostAgreementArticleGroupLineError>
    <PostAgreementArticleGroupLineError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostAgreementArticleGroupLineError>
  </Errors>
  <Id>ad5b775b-c812-4b6d-8ede-ed4c01e8eb37</Id>
  <Success>true</Success>
</AgreementArticleGroupLinePostResponse>