POST api/Supplier

Adds an supplier

Request Information

URI Parameters

None.

Body Parameters

SupplierPostRequest
NameDescriptionTypeAdditional information
Name

string

Max length: 50

CSID

integer

None.

SupplierNumber

integer

None.

SupplierCategoryId1

globally unique identifier

None.

SupplierCategoryId2

globally unique identifier

None.

Phone

string

Max length: 50

Mobile

string

Max length: 50

OrganisationNumber

string

Max length: 30

Town

string

Max length: 50

SearchCode

string

Max length: 10

Email

string

Max length: 50

Fax

string

Max length: 50

Address1

string

Max length: 100

Address2

string

Max length: 100

Address3

string

Max length: 100

PostalCode

string

Max length: 10

CountryId

string

Max length: 2

Url

string

Max length: 100

VatRegistrationNumber

string

Max length: 50

Remarks

None.

Example

None.

Request Formats

application/json, text/json

Sample:
{
  "Name": "sample string 1",
  "CSID": 1,
  "SupplierNumber": 1,
  "SupplierCategoryId1": "1ff72337-bb72-4763-a164-299dcc99ad9f",
  "SupplierCategoryId2": "9f18740d-7760-49ec-b79d-f465e448c5e6",
  "Phone": "sample string 2",
  "Mobile": "sample string 3",
  "OrganisationNumber": "sample string 4",
  "Town": "sample string 5",
  "SearchCode": "sample string 6",
  "Email": "sample string 7",
  "Fax": "sample string 8",
  "Address1": "sample string 9",
  "Address2": "sample string 10",
  "Address3": "sample string 11",
  "PostalCode": "sample string 12",
  "CountryId": "sample string 13",
  "Url": "sample string 14",
  "VatRegistrationNumber": "sample string 15"
}

application/xml, text/xml

Sample:
<SupplierPostRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Supplier">
  <Address1>sample string 9</Address1>
  <Address2>sample string 10</Address2>
  <Address3>sample string 11</Address3>
  <CSID>1</CSID>
  <CountryId>sample string 13</CountryId>
  <Email>sample string 7</Email>
  <Fax>sample string 8</Fax>
  <Mobile>sample string 3</Mobile>
  <Name>sample string 1</Name>
  <OrganisationNumber>sample string 4</OrganisationNumber>
  <Phone>sample string 2</Phone>
  <PostalCode>sample string 12</PostalCode>
  <SearchCode>sample string 6</SearchCode>
  <SupplierCategoryId1>1ff72337-bb72-4763-a164-299dcc99ad9f</SupplierCategoryId1>
  <SupplierCategoryId2>9f18740d-7760-49ec-b79d-f465e448c5e6</SupplierCategoryId2>
  <SupplierNumber>1</SupplierNumber>
  <Town>sample string 5</Town>
  <Url>sample string 14</Url>
  <VatRegistrationNumber>sample string 15</VatRegistrationNumber>
</SupplierPostRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

SupplierPostResponse
NameDescriptionTypeAdditional information
Errors

Collection of PostSupplierError

None.

Success

boolean

None.

Id

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": "c8c842a7-c31c-4bc1-8a0a-378faa358509"
}

application/xml, text/xml

Sample:
<SupplierPostResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Compilator.DDAPI.DTO.Supplier">
  <Errors>
    <PostSupplierError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostSupplierError>
    <PostSupplierError>
      <ErrorCode>InternalServerError</ErrorCode>
      <ErrorMessage>sample string 1</ErrorMessage>
    </PostSupplierError>
  </Errors>
  <Id>c8c842a7-c31c-4bc1-8a0a-378faa358509</Id>
  <Success>true</Success>
</SupplierPostResponse>