POST api/agreements/customer
Add an customer to agreement.
Request Information
URI Parameters
None.
Body Parameters
AgreementCustomerPostRequest| Name | Description | Type | Additional 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": "53491bcd-4af5-4028-bfb2-8f17d9e38539",
"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>53491bcd-4af5-4028-bfb2-8f17d9e38539</ContactId> <CustomerNumber>2</CustomerNumber> <FixedProductRange>true</FixedProductRange> </AgreementCustomerPostRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
AgreementCustomerPostResponse| Name | Description | Type | Additional 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>