POST api/Materials

Create a new material (the code will be created internally)

Request Information

URI Parameters

None.

Body Parameters

MaterialPost
NameDescriptionTypeAdditional information
Description

The Material description

string

Required

Max length: 75

Unit

The unit of the Material

string

Required

Max length: 5

CodingStandard

The coding standard where the new Material should be placed

string

Required

Matching regular expression pattern: \S{1,5}\.\S{1,5}\.\S{1,5}

Cost

The unit cost of the material

decimal number

Equal or above: 0

ManufacturerCode

An optional manufacturer code

string

Max length: 40

ExternalCode

An optional external code

string

Max length: 40

ItemsRelationship

Relationship Items - applied stock items.
Default: true

boolean

None.

Request Formats

Sample:
{
  "Description": "Metal tube",
  "Unit": "m",
  "CodingStandard": "Z.ZZ.ZZZ",
  "ExternalCode": "AX-0005"
}
Sample:
<MaterialPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WebAPI.Models.Materiais">
  <CodingStandard>Z.ZZ.ZZZ</CodingStandard>
  <Cost i:nil="true" />
  <Description>Metal tube</Description>
  <ExternalCode>AX-0005</ExternalCode>
  <ItemsRelationship i:nil="true" />
  <ManufacturerCode i:nil="true" />
  <Unit>m</Unit>
</MaterialPost>
Sample:

Sample not available.

Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Description"

Metal tube
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="Unit"

m
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="CodingStandard"

Z.ZZ.ZZZ
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name="ExternalCode"

AX-0005
--MultipartDataMediaFormatterBoundary1q2w3e--

Response Information

Resource Description

Returns the new material code

string

Response Formats

Sample:
"sample string 1"
Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>
Sample:
--MultipartDataMediaFormatterBoundary1q2w3e
Content-Disposition: form-data; name=""

sample string 1
--MultipartDataMediaFormatterBoundary1q2w3e--