PUT api/Supplier

Updates an supplier

Request Information

URI Parameters

None.

Body Parameters

SupplierPutRequest
NameDescriptionTypeAdditional information
Id

Id for supplier that will be updated

globally unique identifier

None.

Name

Name of the supplier

string

Max length: 50

CSID

Compilator supplier id

integer

None.

SupplierNumber

Supplier number

integer

None.

SupplierCategoryId1

Category 1 for supplier

globally unique identifier

None.

SupplierCategoryId2

Category 2 for supplier

globally unique identifier

None.

Phone

Phone number to the supplier

string

Max length: 50

Mobile

Mobile number to the supplier

string

Max length: 50

OrganisationNumber

Organisation number to the supplier

string

Max length: 30

Town

Town

string

Max length: 50

SearchCode

Search code for supplier

string

Max length: 10

Email

Email to supplier

string

Max length: 50

Fax

Fax number to the supplier

string

Max length: 50

Address1

Address

string

Max length: 100

Address2

Additional address line

string

Max length: 100

Address3

Additional address line

string

Max length: 100

PostalCode

Postal code

string

Max length: 10

CountryId

Id for the country
Use api/countries to get all countries

string

Max length: 2

Url

Url

string

Max length: 100

VatRegistrationNumber

VAT identification number

string

Max length: 50

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "ea0edd0f-2c89-4bdf-979d-0c9abc665f88",
  "Name": "sample string 2",
  "CSID": 1,
  "SupplierNumber": 1,
  "SupplierCategoryId1": "0bda96bf-c358-408b-904f-068f8f479f01",
  "SupplierCategoryId2": "4c4f40e6-06f5-40f9-bf5d-a153a3d63ad5",
  "Phone": "sample string 3",
  "Mobile": "sample string 4",
  "OrganisationNumber": "sample string 5",
  "Town": "sample string 6",
  "SearchCode": "sample string 7",
  "Email": "sample string 8",
  "Fax": "sample string 9",
  "Address1": "sample string 10",
  "Address2": "sample string 11",
  "Address3": "sample string 12",
  "PostalCode": "sample string 13",
  "CountryId": "sample string 14",
  "Url": "sample string 15",
  "VatRegistrationNumber": "sample string 16"
}

application/xml, text/xml

Sample:
<SupplierPutRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Supplier">
  <Address1>sample string 10</Address1>
  <Address2>sample string 11</Address2>
  <Address3>sample string 12</Address3>
  <CSID>1</CSID>
  <CountryId>sample string 14</CountryId>
  <Email>sample string 8</Email>
  <Fax>sample string 9</Fax>
  <Mobile>sample string 4</Mobile>
  <Name>sample string 2</Name>
  <OrganisationNumber>sample string 5</OrganisationNumber>
  <Phone>sample string 3</Phone>
  <PostalCode>sample string 13</PostalCode>
  <SearchCode>sample string 7</SearchCode>
  <SupplierCategoryId1>0bda96bf-c358-408b-904f-068f8f479f01</SupplierCategoryId1>
  <SupplierCategoryId2>4c4f40e6-06f5-40f9-bf5d-a153a3d63ad5</SupplierCategoryId2>
  <SupplierNumber>1</SupplierNumber>
  <Town>sample string 6</Town>
  <Url>sample string 15</Url>
  <VatRegistrationNumber>sample string 16</VatRegistrationNumber>
  <Id>ea0edd0f-2c89-4bdf-979d-0c9abc665f88</Id>
</SupplierPutRequest>

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

Response Information

Resource Description

SupplierPutResponse
NameDescriptionTypeAdditional information
Errors

List of errors when updating supplier

Collection of PutSupplierError

None.

Success

Returns true if supplier is updated

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