POST api/agreements/customer

Add an customer to agreement.

Request Information

URI Parameters

None.

Body Parameters

AgreementCustomerPostRequest
NameDescriptionTypeAdditional information
AgreementNumber

Number of the agreement

integer

None.

CustomerNumber

Number of the customer

integer

None.

ContactId

Customers contact

globally unique identifier

None.

FixedProductRange

Fixed product range

boolean

None.

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "AgreementNumber": 1,
  "CustomerNumber": 2,
  "ContactId": "ef1fbe31-0baf-4e77-b8f8-a5fa13cfc8a6",
  "FixedProductRange": true
}

application/xml, text/xml

Sample:
<AgreementCustomerPostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement">
  <AgreementNumber>1</AgreementNumber>
  <ContactId>ef1fbe31-0baf-4e77-b8f8-a5fa13cfc8a6</ContactId>
  <CustomerNumber>2</CustomerNumber>
  <FixedProductRange>true</FixedProductRange>
</AgreementCustomerPostRequest>

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 'AgreementCustomerPostRequest'.

Response Information

Resource Description

AgreementCustomerPostResponse
NameDescriptionTypeAdditional information
Errors

List of errors when adding an customer to agreement

Collection of PostAgreementCustomerError

None.

Success

Returns true if customer 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:
<AgreementCustomerPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement">
  <Errors>
    <PostAgreementCustomerError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostAgreementCustomerError>
    <PostAgreementCustomerError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostAgreementCustomerError>
  </Errors>
  <Success>true</Success>
</AgreementCustomerPostResponse>