PUT api/agreements/customer

Update customer on agreement.

Request Information

URI Parameters

None.

Body Parameters

AgreementCustomerPutRequest
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

Adds customer to agreement if customer can't be found on agreement

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "AgreementNumber": 1,
  "CustomerNumber": 2,
  "ContactId": "a4e95e74-cc78-44dc-8c6a-597d31ec2d9e",
  "FixedProductRange": true
}

application/xml, text/xml

Sample:
<AgreementCustomerPutRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Agreement">
  <AgreementNumber>1</AgreementNumber>
  <ContactId>a4e95e74-cc78-44dc-8c6a-597d31ec2d9e</ContactId>
  <CustomerNumber>2</CustomerNumber>
  <FixedProductRange>true</FixedProductRange>
</AgreementCustomerPutRequest>

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

Response Information

Resource Description

AgreementCustomerPutResponse
NameDescriptionTypeAdditional information
Errors

List of errors when updating a customer on agreement

Collection of PutAgreementCustomerError

None.

Success

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