POST api/supplier/contact

Adds an contact to supplier

Request Information

URI Parameters

None.

Body Parameters

SupplierContactPostRequest
NameDescriptionTypeAdditional 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": "e97fd4fb-31cf-4288-b505-b8fd2de205a7",
  "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>e97fd4fb-31cf-4288-b505-b8fd2de205a7</SupplierId>
</SupplierContactPostRequest>

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

Response Information

Resource Description

SupplierContactPostResponse
NameDescriptionTypeAdditional 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": "86fab9b2-6fbe-4553-85c2-e14ad3d459c7"
}

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>86fab9b2-6fbe-4553-85c2-e14ad3d459c7</Id>
  <Success>true</Success>
</SupplierContactPostResponse>