POST api/supplier/contact
Adds an contact to supplier
Request Information
URI Parameters
None.
Body Parameters
SupplierContactPostRequest| Name | Description | Type | Additional information |
|---|---|---|---|
| SupplierId |
Id of the supplier that contact belongs to |
globally unique identifier |
Required |
| Name |
Name of the contact |
string |
Required Max length: 50 |
| Phone |
Phone number to the contact |
string |
Max length: 50 |
| Mobile |
Mobile number to contact |
string |
Max length: 50 |
Remarks
None.
Example
None.
Request Formats
application/json, text/json
Sample:
{
"SupplierId": "12ace67f-f4b9-40f9-8a57-4bf838bea516",
"Name": "sample string 2",
"Phone": "sample string 3",
"Mobile": "sample string 4"
}
application/xml, text/xml
Sample:
<SupplierContactPostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Supplier"> <Mobile>sample string 4</Mobile> <Name>sample string 2</Name> <Phone>sample string 3</Phone> <SupplierId>12ace67f-f4b9-40f9-8a57-4bf838bea516</SupplierId> </SupplierContactPostRequest>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
SupplierContactPostResponse| Name | Description | Type | Additional information |
|---|---|---|---|
| Errors |
List of errors when adding a contact to supplier |
Collection of PostSupplierContactError |
None. |
| Success |
Returns true if contact is added |
boolean |
None. |
| Id |
Id of the created contact to supplier |
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": "17d16eb4-9285-4230-940c-9d6fea57d821"
}
application/xml, text/xml
Sample:
<SupplierContactPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Supplier">
<Errors>
<PostSupplierContactError>
<ErrorCode>InternalServerError</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</PostSupplierContactError>
<PostSupplierContactError>
<ErrorCode>InternalServerError</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</PostSupplierContactError>
</Errors>
<Id>17d16eb4-9285-4230-940c-9d6fea57d821</Id>
<Success>true</Success>
</SupplierContactPostResponse>